1
NGUI 3 Support / Inventory Example - How to Dynamically Set Script attribute
« on: December 14, 2013, 06:00:23 PM »
Hi;
I am using the inventory example in my loading screen. I give the user some buttons with images of characters on it, and when they press the button, I load a prefab (in place of the Orc). I am using Playmaker (And a spawn pool from Pool Manager) to do this. (Pmt Spawn, Set Parent - to set spawn's parent to Character Pivot).
For each of the item slots (like Weapon, Body, etc.) there is an attribute in the UIEquipmentSlot script called Equipment, that I need to set to that character, but I can't figure out how to do this. I can't pre-set the value in the Inspector because it changes during runtime.
Can you give me a 'how to' to accomplish this?
Thanks,
Sandi
I am using the inventory example in my loading screen. I give the user some buttons with images of characters on it, and when they press the button, I load a prefab (in place of the Orc). I am using Playmaker (And a spawn pool from Pool Manager) to do this. (Pmt Spawn, Set Parent - to set spawn's parent to Character Pivot).
For each of the item slots (like Weapon, Body, etc.) there is an attribute in the UIEquipmentSlot script called Equipment, that I need to set to that character, but I can't figure out how to do this. I can't pre-set the value in the Inspector because it changes during runtime.
Can you give me a 'how to' to accomplish this?
Thanks,
Sandi
