Skip to content

Instantly share code, notes, and snippets.

@LotteMakesStuff
LotteMakesStuff / AutohookAttribute.cs
Last active July 1, 2024 09:54
[Autohook] property drawer for unity - Add this [Autohook] attribute to a property to and the inspector will automagically hook up a valid reference for you if it can find a component attached to the same game object that matches the field you put it on. You can watch a demo of this in action here https://youtu.be/faVt09NGzws <3
// NOTE DONT put in an editor folder!
using UnityEngine;
public class AutohookAttribute : PropertyAttribute
{
}