Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Enrique Ávila Rodríg |
Hello,
For my project I need to have a standalone executable that has all the base functionality and be capable of loading extra assets at runtime:
Say in main.tscn I have a base node capable of loading a scene (say dlc1.tscn) and instantiate it as a child.
· I want to export the main.tscn without the dlc1.tscn as main.exe.
· Afterwards export dlc1.tscn as dlc1.pck (or any other way)
· Now when I run main.exe it loads the dlc1 scene even though it couldn’t before the second export.
This is the code I have in the main.tscn at the moment (not working)
var scene = load("res://dlc1.tscn")
if (scene != null):
var scene_instance = scene.instance()
scene_instance.set_name("dlc1")
add_child(scene_instance)
Is this even possible?
Thanks in advance!