Mention C# gotchas in Object's dynamic call/set/connect methods
This closes #34015.
(cherry picked from commit 878f03d8e3
)
This commit is contained in:
parent
f031e72395
commit
e41ab634c6
|
@ -97,6 +97,7 @@
|
||||||
[codeblock]
|
[codeblock]
|
||||||
call("set", "position", Vector2(42.0, 0.0))
|
call("set", "position", Vector2(42.0, 0.0))
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
|
[b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="call_deferred" qualifiers="vararg">
|
<method name="call_deferred" qualifiers="vararg">
|
||||||
|
@ -109,6 +110,7 @@
|
||||||
[codeblock]
|
[codeblock]
|
||||||
call_deferred("set", "position", Vector2(42.0, 0.0))
|
call_deferred("set", "position", Vector2(42.0, 0.0))
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
|
[b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="callv">
|
<method name="callv">
|
||||||
|
@ -205,6 +207,7 @@
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code].
|
Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code].
|
||||||
|
[b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_class" qualifiers="const">
|
<method name="get_class" qualifiers="const">
|
||||||
|
@ -405,6 +408,7 @@
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Assigns a new value to the given property. If the [code]property[/code] does not exist, nothing will happen.
|
Assigns a new value to the given property. If the [code]property[/code] does not exist, nothing will happen.
|
||||||
|
[b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_block_signals">
|
<method name="set_block_signals">
|
||||||
|
@ -425,6 +429,7 @@
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling [method set] via [method call_deferred], i.e. [code]call_deferred("set", property, value)[/code].
|
Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling [method set] via [method call_deferred], i.e. [code]call_deferred("set", property, value)[/code].
|
||||||
|
[b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_indexed">
|
<method name="set_indexed">
|
||||||
|
|
Loading…
Reference in New Issue