mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Only allow valid types in Decal, Light3D projector, PointLight2D texture and CSGMesh3D mesh
If an invalid type is supplied (which can still be done from a script), a warning is printed (along with a workaround for ViewportTexture). This also adds support for "negative" resource hints such as "Texture2D,-ViewportTexture" to exclude one or more subclasses from a class hint. Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
This commit is contained in:
committed by
Rémi Verschelde
parent
2b7ea6223b
commit
7a04d85ec3
@@ -124,7 +124,7 @@
|
||||
<description>
|
||||
Returns an [Image] that is a copy of data from this [Texture2D] (a new [Image] is created each time). [Image]s can be accessed and manipulated directly.
|
||||
[b]Note:[/b] This will return [code]null[/code] if this [Texture2D] is invalid.
|
||||
[b]Note:[/b] This will fetch the texture data from the GPU, which might cause performance problems when overused.
|
||||
[b]Note:[/b] This will fetch the texture data from the GPU, which might cause performance problems when overused. Avoid calling [method get_image] every frame, especially on large textures.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_size" qualifiers="const">
|
||||
|
||||
Reference in New Issue
Block a user