godot icon indicating copy to clipboard operation
godot copied to clipboard

Cannot use relative path to create a scene

Open quabug opened this issue 11 years ago • 3 comments

.
├── dir
│   ├── main.gd
│   └── main.xml
└── engine.cfg
# main.gd
extends Node
func _ready():
    print(load("main.xml"))
    print(load("res://dir/main.xml"))

output: [Object:null] [PackedScene:505]

quabug avatar Jan 19 '15 04:01 quabug

Correct me if I'm wrong, but isn't that the right behavior?

the-mech avatar Jan 21 '15 01:01 the-mech

it works with preload(), but not with load()

On Tue, Jan 20, 2015 at 10:54 PM, Roman Nekrassow [email protected] wrote:

Correct me if I'm wrong, but isn't that the right behavior?

— Reply to this email directly or view it on GitHub https://github.com/okamstudio/godot/issues/1265#issuecomment-70771396.

reduz avatar Jan 21 '15 02:01 reduz

IIUC this is by design, so closing.

akien-mga avatar Nov 08 '15 15:11 akien-mga