Quantcast
Channel: Answers for "[RESOLVED]How to get all available parameters from target Component"
Viewing all articles
Browse latest Browse all 6

Answer by fffMalzbier

$
0
0
Sadly the documentation is not very helpful but here is how it works. First you have to include the event namespace using UnityEngine.Events; Then you can define your event: public UnityEvent myevent; That should bring up the ui seen in your image. If you like to invoke your event you can do it like this: if (myevent != null) { myevent.Invoke(); } http://docs.unity3d.com/ScriptReference/Events.UnityEvent.html if you like to use events with parameter you have to define them via a custome class like this [System.Serializable] public class MyIntEvent : UnityEvent { } Then you can create a variable of that custom event type public MyIntEvent m_MyEvent;

Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>