Unity Tree Prototype using for-loop

   312   0   0
User Avatar
Member
7 posts
Joined: Dec. 2021
Offline
Hello!

How should I go about assigning the value to multiple "s@unity_hf_tree_prototype" inside a for-loop? I basically want to make something like:

for(int x = 0; x < ch("XXX"); x++)
{
     s@unity_hf_tree_prototype[x] = ch("parameter[x]");
}

where the value of x is the one from the for-loop, but the tree_prototype function doesn't work as a list, so I don't know how to reference the i value at the end of that function.
* ch("XXX") is going to be a multiparm list folder and ch("parameter") should be string parameters created inside that folder.

The number has to be decided in the UI, so I don't know how many instances need to exist, hence why I have to use a for-loop.
Edited by radumitroi95 - May 6, 2022 12:22:25
  • Quick Links