How to use "Global Object"

I welcome everyone.
Can someone please explain how to use the logiс node “Global Object”, and in particular how to set the global object in the scene?

Hi and welcome :slight_smile:

The global object is created when the first scene is created and it can’t be changed via logic bricks. It also doesn’t change when the scene changes, so it remains the same object for the entire game. You can change it via Haxe (iron.Scene.global) although you probably shouldn’t, as this object can be used for global (static) storage for example (see this). You can use it everywhere an object is required, but it isn’t part of any scene and it isn’t rendered, it’s more like a dummy-object.

Here you can find the documentation for the Global Object node.

So whether it’s useful for you depends on what you want to achieve, but it’s not used very often.

2 Likes