Hello!
I am looking at creating a dynamic foliage replacement system a kin to the one shown in this tutorial:
But I have found an issue when modifying it to work with additional meshes, when the user adds a foliage to the foliage placement tool it enters as “instance_1” the next as “instance_2” and so on.
This mean I can align my replacement array up with the substring length -1 number and use that as the particular dynamic foliage that I want to swap out to.
The issue arises when an item from the list is removed and a new one inserted, this leads to “instance_3” coming after “instance_1” for example.
anyone know of a way to, via detection in the scene, access the item in the foliage array to get a more useable number rather than using the given name?