- changed version to 1.0.7
Make ActiveSetter work even if it is on a disabled game object
From https://forum.unity3d.com/threads/released-data-bind-for-unity.298471/page-3#post-3010057
"Active Setter is cool, but need to be on a different gameobject of the Target, or else it will never reactivate again. Do you have a workaround ? I would like to have it on the gameobject I want to toggle directly."
Comments (10)
-
reporter -
reporter For the ActiveSetter, I guess what could be usefull is to have a checkbox for classes that derives from "SingleSetter", and change this line based on the checkbox:
protected override void OnDisable() { base.OnDisable(); this.Data.ValueChanged -= new DataBinding.ValueChangedDelegate(this.OnObjectValueChanged); }
-
Is there a progress on this issue? I just spent half a day on ActiveSetter not working before I realize it's been disabled by itself.
-
reporter I increase the priority and will try to get it into the next version.
-
reporter -
assigned issue to
-
assigned issue to
-
reporter - removed milestone
-
reporter - changed milestone to 1.0.9
-
reporter Just added a field called DontDisableOnInactive to the ActiveSetter that makes sure that the ActiveSetter is not disabled even if the game object it is on gets inactive.
Although I see that it is annoying to step into this trap (and I stepped into it as well in the beginning), I see this field only as a workaround. In general the ActiveSetter should be disabled as well when its game object becomes inactive, so by default the field is false.
It may still be a good reminder that the ActiveSetter becomes disabled and hopefully devs step less often into this trap.
-
reporter - changed status to resolved
-
reporter - removed milestone
Removing milestone: 1.0.9 (automated comment)
- Log in to comment