GodotObject.setScript

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 _init method will be called.

struct GodotObject
@nogc nothrow
void
setScript

Meta