How to set custom properties for instanced scenes?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JulioYagami

I have a scene I want to customize its properties, but I need to do this by code. It because I want to instance like this:

var i = myLoadedScene.instance()
add_child(i)
// now I want to customize the instance individual properties

With customize you mean change its values or create new properties?

p7f | 2018-12-08 20:33

You already provided the answer:

var i = myLoadedScene.instance()
i.name = "bob" #See i is the object before you add it to the tree
#You can just change it's values here
add_child(i)
// now I want to customize the instance individual properties

MysteryGM | 2018-12-09 00:56

I realized it when I was working on my project. Thank you.

JulioYagami | 2018-12-09 17:35

:bust_in_silhouette: Reply From: JulioYagami
var i = myLoadedScene.instance()
i.name = "bob" #See i is the object before you add it to the tree
#You can just change it's values here
add_child(i)
// now I want to customize the instance individual properties