I have this error when i try to set parent of the object " GraphNode is already parented"
I gives me this error when i try to set any object as a parent, any idea what is wrong ?
It says this error for a ton of things I’ve run into. Let me know how these things work out for you:
-
If dynamic objects are involved, make sure they’re either both already added to the scene or neither of them are added to the scene when you’re doing the parenting
-
Instead of addChild, try it the other way around. this.ball.reparent(this.Holder); and see how that works out for you, since technically that should get rid of all existing parents and make this.Holder the new one.
1 Like
Hi @Dava,
As @ChandlerTwins said try checking if the entity/graphNode you are trying to reparent has already a parent.
The addChild()
method can be used only for entities that don’t belong to the hierarchy yet.
1 Like
You were right , this.ball.reparent works
Thank you
2 Likes