You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
[DLScript] added variant constructor and a function to get userdata of a script
The godot_dlinstance_get_userdata() function can be used to get the DLScript userdata pointer of any object that has a DLScript attached to it. This is particularly useful and even required for language bindings to work properly. This also fixes non-tool builds.
This commit is contained in:
@@ -241,6 +241,8 @@ class DLInstance : public ScriptInstance {
|
||||
public:
|
||||
_FORCE_INLINE_ Object *get_owner() { return owner; }
|
||||
|
||||
_FORCE_INLINE_ void *get_userdata() { return userdata; }
|
||||
|
||||
virtual bool set(const StringName &p_name, const Variant &p_value);
|
||||
virtual bool get(const StringName &p_name, Variant &r_ret) const;
|
||||
virtual void get_property_list(List<PropertyInfo> *p_properties) const;
|
||||
|
||||
Reference in New Issue
Block a user