Rename StreamTexture* to CompressedTexture*

* Its not and will not be used for streaming.
* Streaming will be implemented in 4.1 and it will work different.
* It makes more sense to be called CompressedTexture since it imports and compresses texture files.
This commit is contained in:
reduz
2022-03-05 16:43:38 +01:00
parent ff65d33e8c
commit ccd4cdfd8b
24 changed files with 239 additions and 239 deletions

View File

@@ -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")