- Home /
How do I get the Inspector to show Event boxes when extending Unity objects?
I found an interesting caveat to this answer.
This code will generate the Inspector box:
public class MyHasEventClass: MonoBehaviour
{
[Serializable]
public class MyEventType : UnityEvent<int> { }
public MyEventType channelStart;
}
And this code will not:
public class MyHasEventClass: Image
{
[Serializable]
public class MyEventType : UnityEvent<int> { }
public MyEventType channelStart;
}
Is there some Editor function I can call to get the Event box of the child class to show up when extending Unity classes?
Comment