Click or drag to resize

GDScriptNew Method

Returns a new instance of the script.

For example:

var MyClass = load("myclass.gd")
var instance = MyClass.new()
assert(instance.get_script() == MyClass)

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public Object New(
	params Object[] args
)

Parameters

args
Type: SystemObject

[Missing <param name="args"/> documentation for "M:Godot.GDScript.New(System.Object[])"]

Return Value

Type: Object

[Missing <returns> documentation for "M:Godot.GDScript.New(System.Object[])"]

See Also