I have a scenario in which I need to spawn hundreds of obstacles in front of the player. I don't need them anymore once player.transform.origin.z > player.transform.origin.z. But I need to spawn nodes continuously in front of the player.
So which is more efficient:-
- Deleting unneeded node and creating new Node
- disabling node (by removing it from the tree since there is no enabled property like Unity) and re-enabling it (adding it again to the tree) and changing its position