Answers for "godot instance"

Go
1

how to instance in a node with code godot

#Load the resourse using preload
const MySmokeResource = preload("res://SmokeScene.tscn")

func _ready():
    #Make instance
    var GrabedInstance= MySmokeResource.instance()
    #You could now make changes to the new instance if you wanted
    CurrentEntry.name = "SmokeA"
    #Attach it to the tree
    self.add_child(GrabedInstance)
Posted by: Guest on March-16-2020
0

instancing in godot

var objinstance = load("res://pathtoobject.tscn").instance()
add_child(objinstance)
Posted by: Guest on June-21-2020

Browse Popular Code Answers by Language