Click or drag to resize

AnimatedTexture Class

AnimatedTexture is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike AnimationPlayer or AnimatedSprite, it isn't a Node, but has the advantage of being usable anywhere a Texture resource can be used, e.g. in a TileSet.

The playback of the animation is controlled by the Fps property as well as each frame's optional delay (see SetFrameDelay(Int32, Single)). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame.

AnimatedTexture currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one.

Note: AnimatedTexture doesn't support using AtlasTextures. Each frame needs to be a separate Texture.

Inheritance Hierarchy

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public class AnimatedTexture : Texture

The AnimatedTexture type exposes the following members.

Constructors
  NameDescription
Public methodAnimatedTexture
Initializes a new instance of the AnimatedTexture class
Top
Properties
  NameDescription
Public propertyCurrentFrame

Sets the currently visible frame of the texture.

Public propertyDynamicObject
Gets a new DynamicGodotObject associated with this instance.
(Inherited from Object.)
Public propertyFlags (Inherited from Texture.)
Public propertyFps

Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the Frames property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see SetFrameDelay(Int32, Single)).

For example, an animation with 8 frames, no frame delay and a fps value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds.

Public propertyFrame0__delaySec
Public propertyFrame0__texture
Public propertyFrame1__delaySec
Public propertyFrame1__texture
Public propertyFrame10__delaySec
Public propertyFrame10__texture
Public propertyFrame100__delaySec
Public propertyFrame100__texture
Public propertyFrame101__delaySec
Public propertyFrame101__texture
Public propertyFrame102__delaySec
Public propertyFrame102__texture
Public propertyFrame103__delaySec
Public propertyFrame103__texture
Public propertyFrame104__delaySec
Public propertyFrame104__texture
Public propertyFrame105__delaySec
Public propertyFrame105__texture
Public propertyFrame106__delaySec
Public propertyFrame106__texture
Public propertyFrame107__delaySec
Public propertyFrame107__texture
Public propertyFrame108__delaySec
Public propertyFrame108__texture
Public propertyFrame109__delaySec
Public propertyFrame109__texture
Public propertyFrame11__delaySec
Public propertyFrame11__texture
Public propertyFrame110__delaySec
Public propertyFrame110__texture
Public propertyFrame111__delaySec
Public propertyFrame111__texture
Public propertyFrame112__delaySec
Public propertyFrame112__texture
Public propertyFrame113__delaySec
Public propertyFrame113__texture
Public propertyFrame114__delaySec
Public propertyFrame114__texture
Public propertyFrame115__delaySec
Public propertyFrame115__texture
Public propertyFrame116__delaySec
Public propertyFrame116__texture
Public propertyFrame117__delaySec
Public propertyFrame117__texture
Public propertyFrame118__delaySec
Public propertyFrame118__texture
Public propertyFrame119__delaySec
Public propertyFrame119__texture
Public propertyFrame12__delaySec
Public propertyFrame12__texture
Public propertyFrame120__delaySec
Public propertyFrame120__texture
Public propertyFrame121__delaySec
Public propertyFrame121__texture
Public propertyFrame122__delaySec
Public propertyFrame122__texture
Public propertyFrame123__delaySec
Public propertyFrame123__texture
Public propertyFrame124__delaySec
Public propertyFrame124__texture
Public propertyFrame125__delaySec
Public propertyFrame125__texture
Public propertyFrame126__delaySec
Public propertyFrame126__texture
Public propertyFrame127__delaySec
Public propertyFrame127__texture
Public propertyFrame128__delaySec
Public propertyFrame128__texture
Public propertyFrame129__delaySec
Public propertyFrame129__texture
Public propertyFrame13__delaySec
Public propertyFrame13__texture
Public propertyFrame130__delaySec
Public propertyFrame130__texture
Public propertyFrame131__delaySec
Public propertyFrame131__texture
Public propertyFrame132__delaySec
Public propertyFrame132__texture
Public propertyFrame133__delaySec
Public propertyFrame133__texture
Public propertyFrame134__delaySec
Public propertyFrame134__texture
Public propertyFrame135__delaySec
Public propertyFrame135__texture
Public propertyFrame136__delaySec
Public propertyFrame136__texture
Public propertyFrame137__delaySec
Public propertyFrame137__texture
Public propertyFrame138__delaySec
Public propertyFrame138__texture
Public propertyFrame139__delaySec
Public propertyFrame139__texture
Public propertyFrame14__delaySec
Public propertyFrame14__texture
Public propertyFrame140__delaySec
Public propertyFrame140__texture
Public propertyFrame141__delaySec
Public propertyFrame141__texture
Public propertyFrame142__delaySec
Public propertyFrame142__texture
Public propertyFrame143__delaySec
Public propertyFrame143__texture
Public propertyFrame144__delaySec
Public propertyFrame144__texture
Public propertyFrame145__delaySec
Public propertyFrame145__texture
Public propertyFrame146__delaySec
Public propertyFrame146__texture
Public propertyFrame147__delaySec
Public propertyFrame147__texture
Public propertyFrame148__delaySec
Public propertyFrame148__texture
Public propertyFrame149__delaySec
Public propertyFrame149__texture
Public propertyFrame15__delaySec
Public propertyFrame15__texture
Public propertyFrame150__delaySec
Public propertyFrame150__texture
Public propertyFrame151__delaySec
Public propertyFrame151__texture
Public propertyFrame152__delaySec
Public propertyFrame152__texture
Public propertyFrame153__delaySec
Public propertyFrame153__texture
Public propertyFrame154__delaySec
Public propertyFrame154__texture
Public propertyFrame155__delaySec
Public propertyFrame155__texture
Public propertyFrame156__delaySec
Public propertyFrame156__texture
Public propertyFrame157__delaySec
Public propertyFrame157__texture
Public propertyFrame158__delaySec
Public propertyFrame158__texture
Public propertyFrame159__delaySec
Public propertyFrame159__texture
Public propertyFrame16__delaySec
Public propertyFrame16__texture
Public propertyFrame160__delaySec
Public propertyFrame160__texture
Public propertyFrame161__delaySec
Public propertyFrame161__texture
Public propertyFrame162__delaySec
Public propertyFrame162__texture
Public propertyFrame163__delaySec
Public propertyFrame163__texture
Public propertyFrame164__delaySec
Public propertyFrame164__texture
Public propertyFrame165__delaySec
Public propertyFrame165__texture
Public propertyFrame166__delaySec
Public propertyFrame166__texture
Public propertyFrame167__delaySec
Public propertyFrame167__texture
Public propertyFrame168__delaySec
Public propertyFrame168__texture
Public propertyFrame169__delaySec
Public propertyFrame169__texture
Public propertyFrame17__delaySec
Public propertyFrame17__texture
Public propertyFrame170__delaySec
Public propertyFrame170__texture
Public propertyFrame171__delaySec
Public propertyFrame171__texture
Public propertyFrame172__delaySec
Public propertyFrame172__texture
Public propertyFrame173__delaySec
Public propertyFrame173__texture
Public propertyFrame174__delaySec
Public propertyFrame174__texture
Public propertyFrame175__delaySec
Public propertyFrame175__texture
Public propertyFrame176__delaySec
Public propertyFrame176__texture
Public propertyFrame177__delaySec
Public propertyFrame177__texture
Public propertyFrame178__delaySec
Public propertyFrame178__texture
Public propertyFrame179__delaySec
Public propertyFrame179__texture
Public propertyFrame18__delaySec
Public propertyFrame18__texture
Public propertyFrame180__delaySec
Public propertyFrame180__texture
Public propertyFrame181__delaySec
Public propertyFrame181__texture
Public propertyFrame182__delaySec
Public propertyFrame182__texture
Public propertyFrame183__delaySec
Public propertyFrame183__texture
Public propertyFrame184__delaySec
Public propertyFrame184__texture
Public propertyFrame185__delaySec
Public propertyFrame185__texture
Public propertyFrame186__delaySec
Public propertyFrame186__texture
Public propertyFrame187__delaySec
Public propertyFrame187__texture
Public propertyFrame188__delaySec
Public propertyFrame188__texture
Public propertyFrame189__delaySec
Public propertyFrame189__texture
Public propertyFrame19__delaySec
Public propertyFrame19__texture
Public propertyFrame190__delaySec
Public propertyFrame190__texture
Public propertyFrame191__delaySec
Public propertyFrame191__texture
Public propertyFrame192__delaySec
Public propertyFrame192__texture
Public propertyFrame193__delaySec
Public propertyFrame193__texture
Public propertyFrame194__delaySec
Public propertyFrame194__texture
Public propertyFrame195__delaySec
Public propertyFrame195__texture
Public propertyFrame196__delaySec
Public propertyFrame196__texture
Public propertyFrame197__delaySec
Public propertyFrame197__texture
Public propertyFrame198__delaySec
Public propertyFrame198__texture
Public propertyFrame199__delaySec
Public propertyFrame199__texture
Public propertyFrame2__delaySec
Public propertyFrame2__texture
Public propertyFrame20__delaySec
Public propertyFrame20__texture
Public propertyFrame200__delaySec
Public propertyFrame200__texture
Public propertyFrame201__delaySec
Public propertyFrame201__texture
Public propertyFrame202__delaySec
Public propertyFrame202__texture
Public propertyFrame203__delaySec
Public propertyFrame203__texture
Public propertyFrame204__delaySec
Public propertyFrame204__texture
Public propertyFrame205__delaySec
Public propertyFrame205__texture
Public propertyFrame206__delaySec
Public propertyFrame206__texture
Public propertyFrame207__delaySec
Public propertyFrame207__texture
Public propertyFrame208__delaySec
Public propertyFrame208__texture
Public propertyFrame209__delaySec
Public propertyFrame209__texture
Public propertyFrame21__delaySec
Public propertyFrame21__texture
Public propertyFrame210__delaySec
Public propertyFrame210__texture
Public propertyFrame211__delaySec
Public propertyFrame211__texture
Public propertyFrame212__delaySec
Public propertyFrame212__texture
Public propertyFrame213__delaySec
Public propertyFrame213__texture
Public propertyFrame214__delaySec
Public propertyFrame214__texture
Public propertyFrame215__delaySec
Public propertyFrame215__texture
Public propertyFrame216__delaySec
Public propertyFrame216__texture
Public propertyFrame217__delaySec
Public propertyFrame217__texture
Public propertyFrame218__delaySec
Public propertyFrame218__texture
Public propertyFrame219__delaySec
Public propertyFrame219__texture
Public propertyFrame22__delaySec
Public propertyFrame22__texture
Public propertyFrame220__delaySec
Public propertyFrame220__texture
Public propertyFrame221__delaySec
Public propertyFrame221__texture
Public propertyFrame222__delaySec
Public propertyFrame222__texture
Public propertyFrame223__delaySec
Public propertyFrame223__texture
Public propertyFrame224__delaySec
Public propertyFrame224__texture
Public propertyFrame225__delaySec
Public propertyFrame225__texture
Public propertyFrame226__delaySec
Public propertyFrame226__texture
Public propertyFrame227__delaySec
Public propertyFrame227__texture
Public propertyFrame228__delaySec
Public propertyFrame228__texture
Public propertyFrame229__delaySec
Public propertyFrame229__texture
Public propertyFrame23__delaySec
Public propertyFrame23__texture
Public propertyFrame230__delaySec
Public propertyFrame230__texture
Public propertyFrame231__delaySec
Public propertyFrame231__texture
Public propertyFrame232__delaySec
Public propertyFrame232__texture
Public propertyFrame233__delaySec
Public propertyFrame233__texture
Public propertyFrame234__delaySec
Public propertyFrame234__texture
Public propertyFrame235__delaySec
Public propertyFrame235__texture
Public propertyFrame236__delaySec
Public propertyFrame236__texture
Public propertyFrame237__delaySec
Public propertyFrame237__texture
Public propertyFrame238__delaySec
Public propertyFrame238__texture
Public propertyFrame239__delaySec
Public propertyFrame239__texture
Public propertyFrame24__delaySec
Public propertyFrame24__texture
Public propertyFrame240__delaySec
Public propertyFrame240__texture
Public propertyFrame241__delaySec
Public propertyFrame241__texture
Public propertyFrame242__delaySec
Public propertyFrame242__texture
Public propertyFrame243__delaySec
Public propertyFrame243__texture
Public propertyFrame244__delaySec
Public propertyFrame244__texture
Public propertyFrame245__delaySec
Public propertyFrame245__texture
Public propertyFrame246__delaySec
Public propertyFrame246__texture
Public propertyFrame247__delaySec
Public propertyFrame247__texture
Public propertyFrame248__delaySec
Public propertyFrame248__texture
Public propertyFrame249__delaySec
Public propertyFrame249__texture
Public propertyFrame25__delaySec
Public propertyFrame25__texture
Public propertyFrame250__delaySec
Public propertyFrame250__texture
Public propertyFrame251__delaySec
Public propertyFrame251__texture
Public propertyFrame252__delaySec
Public propertyFrame252__texture
Public propertyFrame253__delaySec
Public propertyFrame253__texture
Public propertyFrame254__delaySec
Public propertyFrame254__texture
Public propertyFrame255__delaySec
Public propertyFrame255__texture
Public propertyFrame26__delaySec
Public propertyFrame26__texture
Public propertyFrame27__delaySec
Public propertyFrame27__texture
Public propertyFrame28__delaySec
Public propertyFrame28__texture
Public propertyFrame29__delaySec
Public propertyFrame29__texture
Public propertyFrame3__delaySec
Public propertyFrame3__texture
Public propertyFrame30__delaySec
Public propertyFrame30__texture
Public propertyFrame31__delaySec
Public propertyFrame31__texture
Public propertyFrame32__delaySec
Public propertyFrame32__texture
Public propertyFrame33__delaySec
Public propertyFrame33__texture
Public propertyFrame34__delaySec
Public propertyFrame34__texture
Public propertyFrame35__delaySec
Public propertyFrame35__texture
Public propertyFrame36__delaySec
Public propertyFrame36__texture
Public propertyFrame37__delaySec
Public propertyFrame37__texture
Public propertyFrame38__delaySec
Public propertyFrame38__texture
Public propertyFrame39__delaySec
Public propertyFrame39__texture
Public propertyFrame4__delaySec
Public propertyFrame4__texture
Public propertyFrame40__delaySec
Public propertyFrame40__texture
Public propertyFrame41__delaySec
Public propertyFrame41__texture
Public propertyFrame42__delaySec
Public propertyFrame42__texture
Public propertyFrame43__delaySec
Public propertyFrame43__texture
Public propertyFrame44__delaySec
Public propertyFrame44__texture
Public propertyFrame45__delaySec
Public propertyFrame45__texture
Public propertyFrame46__delaySec
Public propertyFrame46__texture
Public propertyFrame47__delaySec
Public propertyFrame47__texture
Public propertyFrame48__delaySec
Public propertyFrame48__texture
Public propertyFrame49__delaySec
Public propertyFrame49__texture
Public propertyFrame5__delaySec
Public propertyFrame5__texture
Public propertyFrame50__delaySec
Public propertyFrame50__texture
Public propertyFrame51__delaySec
Public propertyFrame51__texture
Public propertyFrame52__delaySec
Public propertyFrame52__texture
Public propertyFrame53__delaySec
Public propertyFrame53__texture
Public propertyFrame54__delaySec
Public propertyFrame54__texture
Public propertyFrame55__delaySec
Public propertyFrame55__texture
Public propertyFrame56__delaySec
Public propertyFrame56__texture
Public propertyFrame57__delaySec
Public propertyFrame57__texture
Public propertyFrame58__delaySec
Public propertyFrame58__texture
Public propertyFrame59__delaySec
Public propertyFrame59__texture
Public propertyFrame6__delaySec
Public propertyFrame6__texture
Public propertyFrame60__delaySec
Public propertyFrame60__texture
Public propertyFrame61__delaySec
Public propertyFrame61__texture
Public propertyFrame62__delaySec
Public propertyFrame62__texture
Public propertyFrame63__delaySec
Public propertyFrame63__texture
Public propertyFrame64__delaySec
Public propertyFrame64__texture
Public propertyFrame65__delaySec
Public propertyFrame65__texture
Public propertyFrame66__delaySec
Public propertyFrame66__texture
Public propertyFrame67__delaySec
Public propertyFrame67__texture
Public propertyFrame68__delaySec
Public propertyFrame68__texture
Public propertyFrame69__delaySec
Public propertyFrame69__texture
Public propertyFrame7__delaySec
Public propertyFrame7__texture
Public propertyFrame70__delaySec
Public propertyFrame70__texture
Public propertyFrame71__delaySec
Public propertyFrame71__texture
Public propertyFrame72__delaySec
Public propertyFrame72__texture
Public propertyFrame73__delaySec
Public propertyFrame73__texture
Public propertyFrame74__delaySec
Public propertyFrame74__texture
Public propertyFrame75__delaySec
Public propertyFrame75__texture
Public propertyFrame76__delaySec
Public propertyFrame76__texture
Public propertyFrame77__delaySec
Public propertyFrame77__texture
Public propertyFrame78__delaySec
Public propertyFrame78__texture
Public propertyFrame79__delaySec
Public propertyFrame79__texture
Public propertyFrame8__delaySec
Public propertyFrame8__texture
Public propertyFrame80__delaySec
Public propertyFrame80__texture
Public propertyFrame81__delaySec
Public propertyFrame81__texture
Public propertyFrame82__delaySec
Public propertyFrame82__texture
Public propertyFrame83__delaySec
Public propertyFrame83__texture
Public propertyFrame84__delaySec
Public propertyFrame84__texture
Public propertyFrame85__delaySec
Public propertyFrame85__texture
Public propertyFrame86__delaySec
Public propertyFrame86__texture
Public propertyFrame87__delaySec
Public propertyFrame87__texture
Public propertyFrame88__delaySec
Public propertyFrame88__texture
Public propertyFrame89__delaySec
Public propertyFrame89__texture
Public propertyFrame9__delaySec
Public propertyFrame9__texture
Public propertyFrame90__delaySec
Public propertyFrame90__texture
Public propertyFrame91__delaySec
Public propertyFrame91__texture
Public propertyFrame92__delaySec
Public propertyFrame92__texture
Public propertyFrame93__delaySec
Public propertyFrame93__texture
Public propertyFrame94__delaySec
Public propertyFrame94__texture
Public propertyFrame95__delaySec
Public propertyFrame95__texture
Public propertyFrame96__delaySec
Public propertyFrame96__texture
Public propertyFrame97__delaySec
Public propertyFrame97__texture
Public propertyFrame98__delaySec
Public propertyFrame98__texture
Public propertyFrame99__delaySec
Public propertyFrame99__texture
Public propertyFrames

Number of frames to use in the animation. While you can create the frames independently with SetFrameTexture(Int32, Texture), you need to set this value for the animation to take new frames into account. The maximum number of frames is .

Public propertyNativeInstance (Inherited from Object.)
Public propertyOneshot

If true, the animation will only play once and will not loop back to the first frame after reaching the end. Note that reaching the end will not set Pause to true.

Public propertyPause

If true, the animation will pause where it currently is (i.e. at CurrentFrame). The animation will continue from where it was paused when changing this property to false.

Public propertyResourceLocalToScene

If true, the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene.

(Inherited from Resource.)
Public propertyResourceName

The name of the resource. This is an optional identifier. If ResourceName is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the ResourceName will be displayed as the tab name in the script editor.

(Inherited from Resource.)
Public propertyResourcePath

The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index.

(Inherited from Resource.)
Top
Methods
  NameDescription
Public method_Get

Virtual method which can be overridden to customize the return value of Get(String).

Returns the given property. Returns null if the property does not exist.

(Inherited from Object.)
Public method_GetPropertyList

Virtual method which can be overridden to customize the return value of GetPropertyList.

Returns the object's property list as an Array of dictionaries.

Each property's Dictionary must contain at least name: String and type: int (see VariantType) entries. Optionally, it can also include hint: int (see PropertyHint), hint_string: String, and usage: int (see PropertyUsageFlags).

(Inherited from Object.)
Public method_Notification

Called whenever the object receives a notification, which is identified in what by a constant. The base Object has two constants and , but subclasses such as Node define a lot more notifications which are also received by this method.

(Inherited from Object.)
Public method_Set

Virtual method which can be overridden to customize the return value of Set(String, Object).

Sets a property. Returns true if the property exists.

(Inherited from Object.)
Public method_SetupLocalToScene

Virtual function which can be overridden to customize the behavior value of SetupLocalToScene.

(Inherited from Resource.)
Public methodAddUserSignal

Adds a user-defined signal. Arguments are optional, but can be added as an Array of dictionaries, each containing name: String and type: int (see VariantType) entries.

(Inherited from Object.)
Public methodCall

Calls the method on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:

call("set", "position", Vector2(42.0, 0.0))

Note: In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).

(Inherited from Object.)
Public methodCallDeferred

Calls the method on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:

call_deferred("set", "position", Vector2(42.0, 0.0))

Note: In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).

(Inherited from Object.)
Public methodCallv

Calls the method on the object and returns the result. Contrarily to Call(String, Object), this method does not support a variable number of arguments but expects all parameters to be via a single Array.

callv("set", [ "position", Vector2(42.0, 0.0) ])

(Inherited from Object.)
Public methodCanTranslateMessages

Returns true if the object can translate strings. See SetMessageTranslation(Boolean) and Tr(String).

(Inherited from Object.)
Public methodConnect

Connects a signal to a method on a target object. Pass optional binds to the call as an Array of parameters. These parameters will be passed to the method after any parameter used in the call to EmitSignal(String, Object). Use flags to set deferred or one-shot connections. See ObjectConnectFlags constants.

A signal can only be connected once to a method. It will throw an error if already connected, unless the signal was connected with . To avoid this, first, use IsConnected(String, Object, String) to check for existing connections.

If the target is destroyed in the game's lifecycle, the connection will be lost.

Examples:

connect("pressed", self, "_on_Button_pressed") # BaseButton signal
connect("text_entered", self, "_on_LineEdit_text_entered") # LineEdit signal
connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # User-defined signal

An example of the relationship between binds passed to Connect(String, Object, String, Array, UInt32) and parameters used when calling EmitSignal(String, Object):

connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # weapon_type and damage are passed last
emit_signal("hit", "Dark lord", 5) # "Dark lord" and 5 are passed first
func _on_Player_hit(hit_by, level, weapon_type, damage):
    print("Hit by %s (lvl %d) with weapon %s for %d damage" % [hit_by, level, weapon_type, damage])

(Inherited from Object.)
Public methodDisconnect

Disconnects a signal from a method on the given target.

If you try to disconnect a connection that does not exist, the method will throw an error. Use IsConnected(String, Object, String) to ensure that the connection exists.

(Inherited from Object.)
Public methodDispose (Inherited from Object.)
Protected methodDispose(Boolean) (Inherited from Object.)
Public methodDraw (Inherited from Texture.)
Public methodDrawRect (Inherited from Texture.)
Public methodDrawRectRegion (Inherited from Texture.)
Public methodDuplicate

Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing true to the subresources argument which will copy the subresources.

Note: If subresources is true, this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.

(Inherited from Resource.)
Public methodEmitChanged

Emits the changed signal.

If external objects which depend on this resource should be updated, this method must be called manually whenever the state of this resource has changed (such as modification of properties).

The method is equivalent to:

emit_signal("changed")

Note: This method is called automatically for built-in resources.

(Inherited from Resource.)
Public methodEmitSignal

Emits the given signal. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:

emit_signal("hit", weapon_type, damage)
emit_signal("game_over")

(Inherited from Object.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodFree

Deletes the object from memory immediately. For Nodes, you may want to use QueueFree to queue the node for safe deletion at the end of the current frame.

Important: If you have a variable pointing to an object, it will not be assigned to null once the object is freed. Instead, it will point to a previously freed instance and you should validate it with @GDScript.is_instance_valid before attempting to call its methods or access its properties.

(Inherited from Object.)
Public methodGet

Returns the Variant value of the given property. If the property doesn't exist, this will return null.

Note: In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).

(Inherited from Object.)
Public methodGetClass

Returns the object's class as a String.

(Inherited from Object.)
Public methodGetCurrentFrame Obsolete.
Public methodGetData

Returns an Image that is a copy of data from this Texture. Images can be accessed and manipulated directly.

(Inherited from Texture.)
Public methodGetFlags Obsolete. (Inherited from Texture.)
Public methodGetFps Obsolete.
Public methodGetFrameDelay Obsolete.

Returns the given frame's delay value.

Public methodGetFrames Obsolete.
Public methodGetFrameTexture Obsolete.

Returns the given frame's Texture.

Public methodGetHashCode (Inherited from Object.)
Public methodGetHeight

Returns the texture height.

(Inherited from Texture.)
Public methodGetIncomingConnections

Returns an Array of dictionaries with information about signals that are connected to the object.

Each Dictionary contains three String entries:

- source is a reference to the signal emitter.

- signal_name is the name of the connected signal.

- method_name is the name of the method to which the signal is connected.

(Inherited from Object.)
Public methodGetIndexed

Gets the object's property indexed by the given NodePath. The node path should be relative to the current object and can use the colon character (:) to access nested properties. Examples: "position:x" or "material:next_pass:blend_mode".

(Inherited from Object.)
Public methodGetInstanceId

Returns the object's unique instance ID.

This ID can be saved in EncodedObjectAsID, and can be used to retrieve the object instance with @GDScript.instance_from_id.

(Inherited from Object.)
Public methodGetLocalScene

If ResourceLocalToScene is enabled and the resource was loaded from a PackedScene instantiation, returns the local scene where this resource's unique copy is in use. Otherwise, returns null.

(Inherited from Resource.)
Public methodGetMeta

Returns the object's metadata entry for the given name.

(Inherited from Object.)
Public methodGetMetaList

Returns the object's metadata as a String.

(Inherited from Object.)
Public methodGetMethodList

Returns the object's methods and their signatures as an Array.

(Inherited from Object.)
Public methodGetName Obsolete. (Inherited from Resource.)
Public methodGetOneshot Obsolete.
Public methodGetPath Obsolete. (Inherited from Resource.)
Public methodGetPause Obsolete.
Public methodGetPropertyList

Returns the object's property list as an Array of dictionaries.

Each property's Dictionary contain at least name: String and type: int (see VariantType) entries. Optionally, it can also include hint: int (see PropertyHint), hint_string: String, and usage: int (see PropertyUsageFlags).

(Inherited from Object.)
Public methodGetRid

Returns the RID of the resource (or an empty RID). Many resources (such as Texture, Mesh, etc) are high-level abstractions of resources stored in a server, so this function will return the original RID.

(Inherited from Resource.)
Public methodGetScript

Returns the object's Script instance, or null if none is assigned.

(Inherited from Object.)
Public methodGetSignalConnectionList

Returns an Array of connections for the given signal.

(Inherited from Object.)
Public methodGetSignalList

Returns the list of signals as an Array of dictionaries.

(Inherited from Object.)
Public methodGetSize

Returns the texture size.

(Inherited from Texture.)
Public methodGetType (Inherited from Object.)
Public methodGetWidth

Returns the texture width.

(Inherited from Texture.)
Public methodHasAlpha

Returns true if this Texture has an alpha channel.

(Inherited from Texture.)
Public methodHasMeta

Returns true if a metadata entry is found with the given name.

(Inherited from Object.)
Public methodHasMethod

Returns true if the object contains the given method.

(Inherited from Object.)
Public methodHasSignal

Returns true if the given signal exists.

(Inherited from Object.)
Public methodHasUserSignal

Returns true if the given user-defined signal exists. Only signals added using AddUserSignal(String, Array) are taken into account.

(Inherited from Object.)
Public methodInitRef

Initializes the internal reference counter. Use this only if you really know what you are doing.

Returns whether the initialization was successful.

(Inherited from Reference.)
Public methodIsBlockingSignals

Returns true if signal emission blocking is enabled.

(Inherited from Object.)
Public methodIsClass

Returns true if the object inherits from the given class.

(Inherited from Object.)
Public methodIsConnected

Returns true if a connection exists for a given signal, target, and method.

(Inherited from Object.)
Public methodIsLocalToScene Obsolete. (Inherited from Resource.)
Public methodIsQueuedForDeletion (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodNotification

Send a given notification to the object, which will also trigger a call to the _Notification(Int32) method of all classes that the object inherits from.

If reversed is true, _Notification(Int32) is called first on the object's own class, and then up to its successive parent classes. If reversed is false, _Notification(Int32) is called first on the highest ancestor (Object itself), and then down to its successive inheriting classes.

(Inherited from Object.)
Public methodPropertyListChangedNotify

Notify the editor that the property list has changed, so that editor plugins can take the new values into account. Does nothing on export builds.

(Inherited from Object.)
Public methodReference_

Increments the internal reference counter. Use this only if you really know what you are doing.

Returns true if the increment was successful, false otherwise.

(Inherited from Reference.)
Public methodRemoveMeta

Removes a given entry from the object's metadata. See also SetMeta(String, Object).

(Inherited from Object.)
Public methodSet

Assigns a new value to the given property. If the property does not exist, nothing will happen.

Note: In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).

(Inherited from Object.)
Public methodSetBlockSignals

If set to true, signal emission is blocked.

(Inherited from Object.)
Public methodSetCurrentFrame Obsolete.
Public methodSetDeferred

Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling Set(String, Object) via CallDeferred(String, Object), i.e. call_deferred("set", property, value).

Note: In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).

(Inherited from Object.)
Public methodSetFlags Obsolete. (Inherited from Texture.)
Public methodSetFps Obsolete.
Public methodSetFrameDelay Obsolete.

Sets an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by Fps. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be 1.0 / fps + delay.

For example, for an animation with 3 frames, 2 FPS and a frame delay on the second frame of 1.2, the resulting playback will be:

Frame 0: 0.5 s (1 / fps)
Frame 1: 1.7 s (1 / fps + 1.2)
Frame 2: 0.5 s (1 / fps)
Total duration: 2.7 s

Public methodSetFrames Obsolete.
Public methodSetFrameTexture Obsolete.

Assigns a Texture to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID Frames - 1.

You can define any number of textures up to , but keep in mind that only frames from 0 to Frames - 1 will be part of the animation.

Public methodSetIndexed

Assigns a new value to the property identified by the NodePath. The node path should be relative to the current object and can use the colon character (:) to access nested properties. Example:

set_indexed("position", Vector2(42, 0))
set_indexed("position:y", -10)
print(position) # (42, -10)

(Inherited from Object.)
Public methodSetLocalToScene Obsolete. (Inherited from Resource.)
Public methodSetMessageTranslation

Defines whether the object can translate strings (with calls to Tr(String)). Enabled by default.

(Inherited from Object.)
Public methodSetMeta

Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any Variant value.

To remove a given entry from the object's metadata, use RemoveMeta(String). Metadata is also removed if its value is set to null. This means you can also use set_meta("name", null) to remove metadata for "name".

(Inherited from Object.)
Public methodSetName Obsolete. (Inherited from Resource.)
Public methodSetOneshot Obsolete.
Public methodSetPath Obsolete. (Inherited from Resource.)
Public methodSetPause Obsolete.
Public methodSetScript

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.

(Inherited from Object.)
Public methodSetupLocalToScene

This method is called when a resource with ResourceLocalToScene enabled is loaded from a PackedScene instantiation. Its behavior can be customized by overriding _SetupLocalToScene from script.

For most resources, this method performs no base logic. ViewportTexture performs custom logic to properly set the proxy texture and flags in the local viewport.

(Inherited from Resource.)
Public methodTakeOverPath

Sets the path of the resource, potentially overriding an existing cache entry for this path. This differs from setting ResourcePath, as the latter would error out if another resource was already cached for the given path.

(Inherited from Resource.)
Public methodCode exampleToSignal
Returns a new SignalAwaiter awaiter configured to complete when the instance source emits the signal specified by the signal parameter.
(Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodTr

Translates a message using translation catalogs configured in the Project Settings.

Only works if message translation is enabled (which it is by default), otherwise it returns the message unchanged. See SetMessageTranslation(Boolean).

(Inherited from Object.)
Public methodUnreference

Decrements the internal reference counter. Use this only if you really know what you are doing.

Returns true if the decrement was successful, false otherwise.

(Inherited from Reference.)
Top
Fields
  NameDescription
Public fieldStatic memberMaxFrames

The maximum number of frames supported by AnimatedTexture. If you need more frames in your animation, use AnimationPlayer or AnimatedSprite.

Top
See Also