Click or drag to resize

ImageTextureSetData Method

Replaces the texture's data with a new Image.

Note: The texture has to be initialized first with the CreateFromImage(Image, UInt32) method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration, otherwise it has to be re-created with the CreateFromImage(Image, UInt32) method.

Use this method over CreateFromImage(Image, UInt32) if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public void SetData(
	Image image
)

Parameters

image
Type: GodotImage

[Missing <param name="image"/> documentation for "M:Godot.ImageTexture.SetData(Godot.Image)"]

See Also