Sfoglia il codice sorgente

Clarify get_indexed in relation to Nodes

(cherry picked from commit 4ea6709558ae715df45b4b5137f4ae554922cad4)
kobewi 3 anni fa
parent
commit
b8bda1fb67
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      doc/classes/Object.xml

+ 1 - 0
doc/classes/Object.xml

@@ -201,6 +201,7 @@
 			<argument index="0" name="property" type="NodePath" />
 			<description>
 				Gets the object's property indexed by the given [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Examples: [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code].
+				[b]Note:[/b] Even though the method takes [NodePath] argument, it doesn't support actual paths to [Node]s in the scene tree, only colon-separated sub-property paths. For the purpose of nodes, use [method Node.get_node_and_resource] instead.
 			</description>
 		</method>
 		<method name="get_instance_id" qualifiers="const">