Click or drag to resize

ObjectSetScript Method

Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality.

If the object already had a script, the previous script instance will be freed and its variables and state will be lost. The new script's method will be called.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public void SetScript(
	Reference script
)

Parameters

script
Type: GodotReference

[Missing <param name="script"/> documentation for "M:Godot.Object.SetScript(Godot.Reference)"]

See Also