Adjusting order value in isometrix view

Hello developer friends?

I came here because I needed advice.

Currently we are making a customization game

It is characterized by adopting an isometric view.
It’s a game where many characters move around the map.

While making the game, there was a problem with the order values being mixed up.
To solve this, we were changing the order value in the way we adjust priority in UITransform.

In the case of Android, the order value does not change depending on the priority value.

Is there any way to solve this?

I am using cocos creator version 3.8.1.

UITransform.priority was deprecated long time ago. Use node.setSiblingIndex() instead.

And you can directly sort parent.children also. But in android this method has some problems. Take a look at this post.

So, is it impossible to set a fixed order value in Android?

It is possible. But you need read source code and do one more step for Android, I did it once but I lost my code.

Thanks for the reply. I’m currently trying to change the code to setSiblingindex, but when I write that code, the set value changes. For example, if the number of children is 5 and you use setsiblingindex(10), it will be automatically adjusted. Are you saying there is a solution to this?

No,setSiblingIndex was designed to be so, that is its normal behavior. Try to get used to it, It’s not that hard to use.

I get it. Thank you very much for your advice.