From bf62fb059c5fba2def54f20cc1a38aa8c76e81d6 Mon Sep 17 00:00:00 2001 From: Jose Falanga Date: Mon, 24 Jul 2023 10:31:57 -0300 Subject: [PATCH] Clarify when the changed signal is emitted for Resource and ShaderMaterial --- doc/classes/Resource.xml | 2 +- doc/classes/ShaderMaterial.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 83a878bada6e..2a2239f66044 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -32,7 +32,7 @@ - Emits the [signal changed] signal. This method is called automatically for built-in resources. + Emits the [signal changed] signal. This method is called automatically for some built-in resources. [b]Note:[/b] For custom resources, it's recommended to call this method whenever a meaningful change occurs, such as a modified property. This ensures that custom [Object]s depending on the resource are properly updated. [codeblock] var damage: diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index 888964e7f0b4..e2d0696a4b4f 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -5,6 +5,7 @@ A material that uses a custom [Shader] program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader. + [b]Note:[/b] For performance reasons the [signal Resource.changed] signal is only emitted when the [member Resource.resource_name] is changed. Only in editor, is also emitted for [member shader] changes. $DOCS_URL/tutorials/shaders/index.html