Bad tl:dr but basically I want to achieve how Unity handles everything under a single Parent GameObject.
Propagate Call should already do the trick for me.
I want all of my collisions to be disabled if its Owner is not visible, but I have many Collisions that must only be enabled on specific scenarios and must not be enabled by Propagate Call.
ParallaxBackground (CanvasLayer) also does not inherit Parent Visibility but it does hide its Node2Ds, so instead of Propagate Calling CanvasLayers, I just want to get all CanvasLayer Nodes anywhere under a Parent and disable them.
This is currently my Node Setup.
STAGE MANAGER (Holds Script]
STAGE1 [Stage 1 Holder]
COLLISION
StaticBody
CollisionShape
Background Sprites
Battle Area Sprites
Foreground Sprites
STAGE_2 [Stage 2 Holder]
STAGE MANAGER has a script that disables and enables Stage (Stage Holder) depending on what is required. The Parent Nodes was supposed to handle all Child Nodes and every single Child Node of each Child Node. But again, CanvasLayer does not inherit Parent Node Visibility, and CollisionShapes cannot be disabled by just the Visibility.
You want to disable all collisions but enable only some.
You want to get all CanvasLayers.
Pretty sure none of these is equivalent to any of the others. If you just want all your CanvasLayers, put them in a group and use get_tree().call_group().
You can get all your nodes by just adding them to an array recursively, for example. Don’t know if Godot has a built-in way for that.
I get that you were using unity and probably liked the way they did things, but why not just take the proper time to learn how Godot does it and work with it that way? Wouldn’t it be far much easier to deal with in the medium and long term? If you don’t, I feel you’ll always have to work around things and that won’t be fun when things get modified in a potential future.
You do you, but, I don’t know, seems to me this is more complicated than just learning the new engine you’re switching to.
You can use find_children() to find all children and grandchildren of the Node that are of specific type.
You can use “*” in the first parameter to make it look for all names and make sure to make it recursive to find grandchildren as well.
You do you, but, I don’t know, seems to me this is more complicated than just learning the new engine you’re switching to.
I get you. And don’t worry I made so many adjustments and can say I’m much more comfortable in Godot. I just pointed it out in tl:dr what I was trying to achieve as it was kind of, necessary to the goal I was trying to approach, not because it came from Unity.