Skip to content

World Sub-Scene References #21

@ghost

Description

One thing I was hoping to do (but had trouble with) was put references to sub-scenes of World in global.gd. For example:

global.gd
var level = get_tree().get_root().get_node("World/Level")

level.gd
var level = get_node("/root/global").level

The problem is that because global.gd is instantiated before the scene tree, global.gd can't find the tree and so it throws a fit.

Any ideas for the best way to implement these references? Perhaps it would be easiest to create a script for World and store them in there.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions