Okay, this one is really hanging me up . . . hopefully it's something stupid and someone out there can set me straight.
I have a prefab with an NGUI UITexture on it. The prefab has several manually instantiated objects in the scene (not generated at runtime). There is also a set of buttons representing texture options. The desired functionality is to click a button and change the texture on the instantiated objects. Simple enough.
I've got an FSM on each button, which, on click, gets the value of its texture, stores it in a global var, and then sets the texture on the prefab with the global var value. This seems to work, but ONLY after running the app for the second time. On the first try after opening the project/scene, absolutely nothing happens. As soon as I hit "stop", the textures all change to what they should have been when I clicked the button. And from then on, as I said, everything works as expected.
I'm guessing that the issue has to do with initializing the global var, and I've tried several approaches at doing that, but none have succeeded.
I've also tried sending events to the prefab so that it would set itself, but couldn't get that to work either,no idea why.
Any assistance here would be greatly appreciated!
Thanks!