diff options
Diffstat (limited to 'doc/classes/ImageTexture.xml')
-rw-r--r-- | doc/classes/ImageTexture.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index d35dacfcde..aecb4fc4b6 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -18,7 +18,7 @@ var texture = load("res://icon.png") $Sprite2D.texture = texture [/codeblock] - This is because images have to be imported as a [StreamTexture2D] first to be loaded with [method @GDScript.load]. If you'd still like to load an image file just like any other [Resource], import it as an [Image] resource instead, and then load it normally using the [method @GDScript.load] method. + This is because images have to be imported as a [CompressedTexture2D] first to be loaded with [method @GDScript.load]. If you'd still like to load an image file just like any other [Resource], import it as an [Image] resource instead, and then load it normally using the [method @GDScript.load] method. [b]Note:[/b] The image can be retrieved from an imported texture using the [method Texture2D.get_image] method, which returns a copy of the image: [codeblock] var texture = load("res://icon.png") |