Is there a way for a node to distinguish between its own children and the ones given by the parent scene?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By 2plus2makes5

Let me clarify, there’s:

Scene1
-child1

and then there’s:

Scene2
-Scene1(with child1)
–child2

in Scene2 Scene1 gets another child: child2, is there a way to get only child1 or child2 from code?

:bust_in_silhouette: Reply From: exuin

Nodes have an owner property that refers to the node in the scene that “owns” them. Maybe you can check the owner when looping through children?

I didn’t think about that, i’ll try it. :slight_smile:

EDIT:
It works! Thanks.

2plus2makes5 | 2021-06-15 13:37