Skip to content

Commit e541ed1

Browse files
committed
Merge pull request #107823 from KoBeWi/setgettt
Clarify `_set`/`_get` description
2 parents b310244 + 29a3f56 commit e541ed1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/classes/Object.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
<param index="0" name="property" type="StringName" />
3636
<description>
3737
Override this method to customize the behavior of [method get]. Should return the given [param property]'s value, or [code]null[/code] if the [param property] should be handled normally.
38-
Combined with [method _set] and [method _get_property_list], this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property must be present in [method get_property_list], otherwise this method will not be called.
38+
Combined with [method _set] and [method _get_property_list], this method allows defining custom properties, which is particularly useful for editor plugins.
39+
[b]Note:[/b] This method is not called when getting built-in properties of an object, including properties defined with [annotation @GDScript.@export].
3940
[codeblocks]
4041
[gdscript]
4142
func _get(property):
@@ -289,7 +290,8 @@
289290
<param index="1" name="value" type="Variant" />
290291
<description>
291292
Override this method to customize the behavior of [method set]. Should set the [param property] to [param value] and return [code]true[/code], or [code]false[/code] if the [param property] should be handled normally. The [i]exact[/i] way to set the [param property] is up to this method's implementation.
292-
Combined with [method _get] and [method _get_property_list], this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property [i]must[/i] be present in [method get_property_list], otherwise this method will not be called.
293+
Combined with [method _get] and [method _get_property_list], this method allows defining custom properties, which is particularly useful for editor plugins.
294+
[b]Note:[/b] This method is not called when setting built-in properties of an object, including properties defined with [annotation @GDScript.@export].
293295
[codeblocks]
294296
[gdscript]
295297
var internal_data = {}

0 commit comments

Comments
 (0)