Hi, I’m trying to render a sprite above another sprite. I need to do that dynamically in my code but this logic is not working.
I’m enabling random 2D trees and the new enabled tree should be behind the already enabled trees.
disabledTrees[i].sprite.drawOrder = this.drawOrderIndex;
Can someone help me, please?
Thanks in advance