summaryrefslogtreecommitdiff
path: root/doc/classes/Object.xml
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-12-30 17:23:23 +0100
committerGitHub <noreply@github.com>2019-12-30 17:23:23 +0100
commitfdfb7e5fc44d5fbbcaf9a09c8732596d925c7a80 (patch)
tree7197f35af2dd19768f75f1756ba975f2ce692d30 /doc/classes/Object.xml
parente9696628f18a7b5ff4b77a8a4c86d5a2cd2c9790 (diff)
parentbc234ce0aee97a4667117626875b96d300a62b48 (diff)
Merge pull request #34621 from cbscribe/kcc_misc_doc_fixes
[Docs] Description updates for Node2D & Object
Diffstat (limited to 'doc/classes/Object.xml')
-rw-r--r--doc/classes/Object.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 5a09fe39c0..1e5b8669fd 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -9,6 +9,12 @@
Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the [method free] method from your script or delete the instance from C++.
Some classes that extend Object add memory management. This is the case of [Reference], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory.
Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
+ Property membership can be tested directly in GDScript using [code]in[/code]:
+ [codeblock]
+ var n = Node2D.new()
+ print("position" in n) # Prints "True".
+ print("other_property" in n) # Prints "False".
+ [/codeblock]
Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification].
</description>
<tutorials>