Moving entity child not working in 2D Screen in editor hierarchy


I have a 2D Screen entity (in my scene) with a lot of children. to get an overview, i added empty entities under this 2D Screen and placed all the children under there empty entities (like you would organize files in separate folders to get a better overview of everything under it).

However, when i move one of these “folders”, it looks like the contents have moved in my scene (in the editor), but when i press play, to see what it looks like when you are playing, it hasn’t moved at all. They just stand in the same place.

They only move if i select the objects in the folders and move them. but that’s not what i want, i want to move the folder, so that all items in this folder move too. and that’s not the case.

Below is a picture of my editor hierarchy. the 2D screen is child of the Root. the “folders” i was talking about are the “LINEUP_X_X_X” entities, and the actual objects are the ones that are called “PlayerPosition”.

Thanks in advance!

Without looking into it, you may need those ‘folders’ to have a Group Element component:

Thanks for your reply!

I’ll test this in a moment, but i just don’t get why this normal “folders” can’t do the trick… I mean that’s the whole point of having parents and children, is that the child has to follow the transformations of the parent and maybe have some of their own on top of that. it feels very counterintuitive so i’m trying to understand why that wouldn’t work.

this indeed worked, thank you very much!

still, do you know why i need to add the group element? i’m just trying to understand, and currently i don’t…

It’s because it’s under a UI Screen parent. There’s specialised logic on how elements are rendered.

Yes but in Unity you can also make a “canvas”, which is the same as a UI Screen parent in PlayCanvas, it it still just moves along like parents and childs should. i mean, to me (but maybe it’s just me), i think that the whole point of parents and children is that they pass their translations throught to their children. I can’t think of a project where i would’ve wanted the children to always stay in place.
But okay, i guess in a weird way i can understand. it’s probably just me :smiley:

Thanks for your answer!

In Unity, it automatically changes the transform of any child gameobjects to be used for the UI Canvas. PlayCanvas doesn’t.

1 Like