- Home /
Action delegate doesn't show in inspector.
Unity comes with components that have references to methods assignable through inspector (such as http://docs.unity3d.com/ScriptReference/UI.Button.html, the on click callbacks from gui buttons).
Yet I can't figure out how to add similar functionality to my own components.
I'd say what I've tried so far, but unfortunately I haven't found anything to try yet. I'm hoping there's a simple solution to this.
Answer by sumeeton · Mar 31, 2015 at 03:33 AM
You'll need to use UnityEvents so that you can have them in the inspector.
Take a look:
http://docs.unity3d.com/Manual/UnityEvents.html
You might also want to see this video:
Your answer
Follow this Question
Related Questions
When to use 'delegate', 'event' or 'Action' ? 1 Answer
public static Callback problems 0 Answers
Unsolvable issue with System.Action and IEnumerator 0 Answers
Interaction script 2 Answers
How can callback from shared object 0 Answers