vexe / VFW

MIT License
492 stars 67 forks source link

How to activate game object from uDelegate? #34

Closed bartlomiejwolk closed 9 years ago

bartlomiejwolk commented 9 years ago

In UnityEvent, when I reference a game object, I can select GameObject and the SetActive() to either activate or deactivate the game object. It's really usefull but uDelegate seem to not have this option?

screenshot_22

vexe commented 9 years ago

Are you talking about gameObject.SetActive in particular?

bartlomiejwolk commented 9 years ago

yeah, but also other methods and properties in the GameObject.

vexe commented 9 years ago

Go to DelegateDrawer.cs, change the function calls in the lines (might have slightly different numbers) 236 and 506 from: GetAllComponents to GetAllComponentsIncludingSelf - That will include the gameObject in the list of targets.

bartlomiejwolk commented 9 years ago

It works, thx. Will this change be included in the next release? I would really want that.

vexe commented 9 years ago

Sure