1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Allow instantiate unexposed EditorPlugin form GDExtension.

This commit is contained in:
Daylily-Zeleen
2025-04-02 14:48:26 +08:00
parent c7ea8614d7
commit 1cc879afc0
3 changed files with 20 additions and 8 deletions

View File

@@ -216,9 +216,9 @@ private:
static MethodBind *_bind_vararg_method(MethodBind *p_bind, const StringName &p_name, const Vector<Variant> &p_default_args, bool p_compatibility);
static void _bind_method_custom(const StringName &p_class, MethodBind *p_method, bool p_compatibility);
static Object *_instantiate_internal(const StringName &p_class, bool p_require_real_class = false, bool p_notify_postinitialize = true);
static Object *_instantiate_internal(const StringName &p_class, bool p_require_real_class = false, bool p_notify_postinitialize = true, bool p_exposed_only = true);
static bool _can_instantiate(ClassInfo *p_class_info);
static bool _can_instantiate(ClassInfo *p_class_info, bool p_exposed_only = true);
public:
// DO NOT USE THIS!!!!!! NEEDS TO BE PUBLIC BUT DO NOT USE NO MATTER WHAT!!!
@@ -520,6 +520,8 @@ public:
static void get_native_struct_list(List<StringName> *r_names);
static String get_native_struct_code(const StringName &p_name);
static uint64_t get_native_struct_size(const StringName &p_name); // Used for asserting
static Object *_instantiate_allow_unexposed(const StringName &p_class); // Used to create unexposed classes from GDExtension, typically for unexposed EditorPlugin.
};
#define BIND_ENUM_CONSTANT(m_constant) \