sigtrapgames / SmartData

A designer-friendly, editor-driven Unity3D framework for connecting data and events.
MIT License
271 stars 14 forks source link

Multiple instances of SmartRefUnbinder #13

Closed kaikuehne closed 5 years ago

kaikuehne commented 5 years ago

Hi, and thanks for sharing this project. I just started to tinker with it, but am not sure if I have fully understood it. In my game, I'm instanciating a HUD instance from a prefab. That prefab is connected to PlayerHealth (IntVar). Manually adding a listener for the event using BindListener works perfectly, but if I use the inspector to select the method and enable Auto Listen a new instance of SmartRefUnbinder is added to the HUD instance every time I run the game. This persists after exiting play-mode and changes the prefab itself as well. What did I do wrong here? Please take a look at the screenshot, thanks!

Please note that I'm using the Unity package.

kaikuehne commented 5 years ago

Hi. I guess this ticket could also be closed?