Does hidden node use CPU/GPU power?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By desik
:warning: Old Version Published before Godot 3 was released.

Hi Godoters!
I have a spell node with script attached. Spell node has collision child node and a few particle nodes. I want to have a few types of spells. I am not sure if hiding child nodes is enough to save some CPU/processing power.

I wanted to do something like I have lets say particle2d called “fire” and “water”.
When a spell is casted (spell have to be specific type) I hide other nodes.

Is it enough? Maybe should I do this in another way?

Thank you

:bust_in_silhouette: Reply From: ludosar

Hi,

instead of hiding your node, you should use the emitting property:

get_node("particles").set("config/emitting",true)
get_node("particles").set("config/emitting",false)
:bust_in_silhouette: Reply From: Zylann

I would create a different scene for each spell if they look too different. If you are afraid of copy/pasting, you can have a base Spell scene and make the spells inherit from it. This way you don’t have to hide stuff, because particles are just not there as you don’t need them :slight_smile: