Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.


Inherits: Resource < RefCounted < Object

Inherited By: CSharpScript, GDScript, ScriptExtension

A class stored as a resource.


A class stored as a resource. A script extends the functionality of all objects that instantiate it.

This is the base class for all scripts and should not be used directly. Trying to create a new script with this class will result in an error.

The new method of a script subclass creates a new instance. Object.set_script extends an existing object, if that object's class matches one of the script's base class