Hello, Happy Sunday . . . next chapter in the travails of creating a drill-down style menuing system . . .
I'm successfully generating dynamic lists via a hashtable. I now need to change the list items based on various button clicks, so that when I click on button 1, items 1.1, 1.2, 1.3 will display, and when I click on button 2, items 2.1, 2.2, 2.3, etc. will display.
I'm using NGUI, and the NGUI Tools AddChild action, to instantiate the pre-fabbed buttons that comprise the list. As there is no RemoveChild action, I've attempted to use GetNextChild and destroy the child objects. In the GetNextChild action, I'm assigning each child object to a local variable (called "childObj"), and, in the next state, am using a DestroyObject action that calls the childObj variable.
The problem is that it gets as far as the DestroyObject action, destroys the first child, and then hangs, e.g. never completes the first loop. I've tried it with lists of both one and many objects, and the result is the same.
The strange thing, which I've highlighted in red, is that the variable assignment doesn't seem to be reflected in the Destroy action, eventhough the first item is actually destroyed -- so it must be registering somewhere.
I'm going to keep banging on it, of course, but any insight would be appreciated!
Thanks,
Richard