![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Eray Erdin |
Today I discovered Godot actually sets up runtime nodes. You can see what I mean below:
When I run the game with debugging options, I can see these nodes under “Remote” tab in scene dock. So, that got me wondering… When I GetNode
, do I actually access these runtime nodes?
To give an example, consider these three seperate scenes:
Foo
> foo: Node2D
Bar
> bar: Node2D
Container
> container: Node2D
>> foo: Node2D (injecting Foo)
>> bar: Node2D (injecting Bar)
In this case, Container
scene is parent and importing/injecting foo
and bar
. So, in Foo.cs
, can I access the injector, which is container
node, as below:
// Foo.cs
Node2D container = (Node2D)GetNode("/root/container");
Or will this fail?
Environment
- Godot Mono 3.2
- Mono JIT Compiler 6.4.0
- Manjaro 19.0.2