Bug description:
GetSiblingIndex always returns zero on scene root game objects in build runtime.
It’s working good for parented objects.
In editor play mode runtime, it’s working perfect for both root and parented objects. The only problem is in build runtime for only root objects.
Steps: (test project was included in bug record when I reported it via bug reporter tool)
Open the test scene in editor
Start the play mode and see the sibling index is 1.
Build the project and run it.
Notice the sibling index is zero which is a huge bug!!!
Sorry Yes I was. Its not actually a bug as such, its using editor only features and so disabled at run time. We basically have a scene root object that does not exist outside of the editor. This could potentially be addressed with the future changes being made to the scene system at the moment but its not something that can be quickly fixed. Its now back with the core team to look at. As a workaround whilst you wait you could create a single GameObject as a scene root if you needed to replicate the behavior.