Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: kittikun on June 17, 2014, 03:31:01 AM
-
Hi,
I am trying to dynamically changed the UILocalize key after it has already been created but UILocalize doesn't pickup the change. If I disable and renable the object, it will work fine.
I can use Localization.Get but that would defeat the purpose of having a UILocalize on my labels
Another alternative i'd like to avoid would be to call SendMessage("OnLocalize") on my UILocalize component
Why not having key beeing a property that would call OnLocalize upon a set ?
Thank you
-
UILocalize was designed with minimal performance impact in mind -- so it performs its task once, and it's done. What you're doing is changing its key -- which is just a public variable. It's not a property. It's up to you to call uiLocalize.value = Localization.Get(uiLocalize.key) after changing the key.