Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: swilskey on July 20, 2014, 02:10:13 PM

Title: Property Binding
Post by: swilskey on July 20, 2014, 02:10:13 PM
I am using property binding to connect a bool to a tween position.enabled. The source is a time and score script that sets the bool if the player completes the level under a certain time. I am having to set the gameobject that the script is attached to on every level and am wondering if there is a way that I set this once make the UI a prefab and then just add the prefab to every level instead of having to set the source on every level.

Thanks
Title: Re: Property Binding
Post by: ArenMook on July 20, 2014, 06:33:47 PM
Prefabs can only reference values that are a part of the prefab. If you reference some external value, the reference will be broken. Think about it -- prefabs are completely stand-alone self-contained objects.
Title: Re: Property Binding
Post by: swilskey on July 20, 2014, 07:19:58 PM
That makes Sense. Just trying to find a better way to do the binding so that I don't have to set the values for each scene. Thanks for the help.