Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/variant/variant_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2449,6 +2449,7 @@ VARIANT_ENUM_CAST(ResourceDeepDuplicateMode);
static void _register_variant_builtin_methods_misc() {
/* RID */

bind_method(RID, is_null, sarray(), varray());
bind_method(RID, is_valid, sarray(), varray());
bind_method(RID, get_id, sarray(), varray());

Expand Down
8 changes: 7 additions & 1 deletion doc/classes/RID.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@
Returns the ID of the referenced low-level resource.
</description>
</method>
<method name="is_null" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the [RID] has the ID [code]0[/code]. This is the inverse of [method is_valid].
</description>
</method>
<method name="is_valid" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the [RID] is not [code]0[/code].
Returns [code]true[/code] if the [RID] is not [code]0[/code]. This is the inverse of [method is_null].
</description>
</method>
</methods>
Expand Down