[SOLVED] Editing Hierarchy Order Via Code

Hey everyone,

Due to some issues with a Photon multiplayer project I’m creating, I need to be able to change the entity order programmatically. Any way to do this?

Hi @DevilZ,

Sure, you can use the reparent method which takes an optional index argument to specify the index this child entity should be placed.

https://developer.playcanvas.com/en/api/pc.Entity.html#reparent

1 Like

Thanks for that @Leonidas.

1 Like