Compare commits

...

2 Commits

Author SHA1 Message Date
Serhii Snitsaruk 20344c8b03
Merge a490ce25f6 into 0145e900f3 2024-01-20 03:53:24 +08:00
Serhii Snitsaruk a490ce25f6 Add `is_class_static` virtual method to GDCLASS macro. 2024-01-10 13:12:22 +01:00
1 changed files with 8 additions and 0 deletions

View File

@ -99,6 +99,10 @@ public:
return string_name;
}
virtual bool is_class_static(const StringName &p_string_name) const {
return p_string_name == get_class_static();
}
uint64_t get_instance_id() const {
return 0;
}
@ -212,6 +216,10 @@ public:
return string_name; \
} \
\
virtual bool is_class_static(const StringName &p_string_name) const override { \
return get_class_static() == p_string_name; \
} \
\
static ::godot::StringName &get_parent_class_static() { \
return m_inherits::get_class_static(); \
} \