diff options
Diffstat (limited to 'modules/gdnative')
-rw-r--r-- | modules/gdnative/SCsub | 6 | ||||
-rw-r--r-- | modules/gdnative/android/android_gdn.cpp | 73 | ||||
-rw-r--r-- | modules/gdnative/arvr/arvr_interface_gdnative.cpp | 4 | ||||
-rw-r--r-- | modules/gdnative/config.py | 2 | ||||
-rw-r--r-- | modules/gdnative/gdnative_api.json | 25 | ||||
-rw-r--r-- | modules/gdnative/include/android/godot_android.h | 54 | ||||
-rw-r--r-- | modules/gdnative/include/arvr/godot_arvr.h | 8 | ||||
-rw-r--r-- | modules/gdnative/include/nativescript/godot_nativescript.h | 3 | ||||
-rw-r--r-- | modules/gdnative/nativescript/nativescript.cpp | 38 | ||||
-rw-r--r-- | modules/gdnative/nativescript/nativescript.h | 4 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_instance.cpp | 4 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_instance.h | 4 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_script.cpp | 47 | ||||
-rw-r--r-- | modules/gdnative/pluginscript/pluginscript_script.h | 8 |
14 files changed, 219 insertions, 61 deletions
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub index 6d2f8ce8ad..a3434995aa 100644 --- a/modules/gdnative/SCsub +++ b/modules/gdnative/SCsub @@ -5,6 +5,7 @@ Import('env') gdn_env = env.Clone() gdn_env.add_source_files(env.modules_sources, "gdnative.cpp") gdn_env.add_source_files(env.modules_sources, "register_types.cpp") +gdn_env.add_source_files(env.modules_sources, "android/*.cpp") gdn_env.add_source_files(env.modules_sources, "gdnative/*.cpp") gdn_env.add_source_files(env.modules_sources, "nativescript/*.cpp") gdn_env.add_source_files(env.modules_sources, "gdnative_library_singleton_editor.cpp") @@ -49,6 +50,7 @@ def _build_gdnative_api_struct_header(api): '#define GODOT_GDNATIVE_API_STRUCT_H', '', '#include <gdnative/gdnative.h>', + '#include <android/godot_android.h>', '#include <arvr/godot_arvr.h>', '#include <nativescript/godot_nativescript.h>', '#include <pluginscript/godot_pluginscript.h>', @@ -194,7 +196,7 @@ def build_gdnative_api_struct(target, source, env): with open(source.path, 'w') as fd: fd.write(_build_gdnative_api_struct_source(api)) -_, gensource = gdn_env.Command(['include/gdnative_api_struct.gen.h', 'gdnative_api_struct.gen.cpp'], +_, gensource = gdn_env.CommandNoCache(['include/gdnative_api_struct.gen.h', 'gdnative_api_struct.gen.cpp'], 'gdnative_api.json', build_gdnative_api_struct) gdn_env.add_source_files(env.modules_sources, [gensource]) @@ -275,7 +277,7 @@ def build_gdnative_wrapper_code(target, source, env): if ARGUMENTS.get('gdnative_wrapper', False): #build wrapper code - gensource, = gdn_env.Command('gdnative_wrapper_code.gen.cpp', 'gdnative_api.json', build_gdnative_wrapper_code) + gensource, = gdn_env.CommandNoCache('gdnative_wrapper_code.gen.cpp', 'gdnative_api.json', build_gdnative_wrapper_code) gd_wrapper_env = env.Clone() gd_wrapper_env.Append(CPPPATH=['#modules/gdnative/include/']) diff --git a/modules/gdnative/android/android_gdn.cpp b/modules/gdnative/android/android_gdn.cpp new file mode 100644 index 0000000000..edc948e086 --- /dev/null +++ b/modules/gdnative/android/android_gdn.cpp @@ -0,0 +1,73 @@ +/*************************************************************************/ +/* android_gdn.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#include "modules/gdnative/gdnative.h" + +// Code by Paritosh97 with minor tweaks by Mux213 +// These entry points are only for the android platform and are simple stubs in all others. + +#ifdef __ANDROID__ +#include "platform/android/thread_jandroid.h" +#else +#define JNIEnv void +#define jobject void * +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +JNIEnv *GDAPI godot_android_get_env() { +#ifdef __ANDROID__ + return ThreadAndroid::get_env(); +#else + return NULL; +#endif +} + +jobject GDAPI godot_android_get_activity() { +#ifdef __ANDROID__ + JNIEnv *env = ThreadAndroid::get_env(); + + jclass activityThread = env->FindClass("android/app/ActivityThread"); + jmethodID currentActivityThread = env->GetStaticMethodID(activityThread, "currentActivityThread", "()Landroid/app/ActivityThread;"); + jobject at = env->CallStaticObjectMethod(activityThread, currentActivityThread); + jmethodID getApplication = env->GetMethodID(activityThread, "getApplication", "()Landroid/app/Application;"); + jobject context = env->CallObjectMethod(at, getApplication); + + return env->NewGlobalRef(context); +#else + return NULL; +#endif +} + +#ifdef __cplusplus +} +#endif
\ No newline at end of file diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp index 49e0a19d9e..385c020a78 100644 --- a/modules/gdnative/arvr/arvr_interface_gdnative.cpp +++ b/modules/gdnative/arvr/arvr_interface_gdnative.cpp @@ -217,6 +217,10 @@ void ARVRInterfaceGDNative::process() { extern "C" { void GDAPI godot_arvr_register_interface(const godot_arvr_interface_gdnative *p_interface) { + // If our major version is 0 or bigger then 10, we're likely looking at our constructor pointer from an older plugin + ERR_EXPLAINC("GDNative ARVR interfaces build for Godot 3.0 are not supported"); + ERR_FAIL_COND((p_interface->version.major == 0) || (p_interface->version.major > 10)); + Ref<ARVRInterfaceGDNative> new_interface; new_interface.instance(); new_interface->set_interface((godot_arvr_interface_gdnative *const)p_interface); diff --git a/modules/gdnative/config.py b/modules/gdnative/config.py index 68148c4d87..626e9239f8 100644 --- a/modules/gdnative/config.py +++ b/modules/gdnative/config.py @@ -1,4 +1,4 @@ -def can_build(platform): +def can_build(env, platform): return True def configure(env): diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json index 9fcf61af8a..217fd87c3e 100644 --- a/modules/gdnative/gdnative_api.json +++ b/modules/gdnative/gdnative_api.json @@ -5962,11 +5962,34 @@ ] }, { + "name": "android", + "type": "ANDROID", + "version": { + "major": 1, + "minor": 0 + }, + "next": null, + "api": [ + { + "name": "godot_android_get_env", + "return_type": "JNIEnv*", + "arguments": [ + ] + }, + { + "name": "godot_android_get_activity", + "return_type": "jobject", + "arguments": [ + ] + } + ] + }, + { "name": "arvr", "type": "ARVR", "version": { "major": 1, - "minor": 0 + "minor": 1 }, "next": null, "api": [ diff --git a/modules/gdnative/include/android/godot_android.h b/modules/gdnative/include/android/godot_android.h new file mode 100644 index 0000000000..832dac9ac3 --- /dev/null +++ b/modules/gdnative/include/android/godot_android.h @@ -0,0 +1,54 @@ +/*************************************************************************/ +/* godot_android.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ + +#ifndef GODOT_ANDROID_GDN_H +#define GODOT_ANDROID_GDN_H + +#include <gdnative/gdnative.h> + +#ifdef __ANDROID__ +#include <jni.h> +#else +#define JNIEnv void +#define jobject void * +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +JNIEnv *GDAPI godot_android_get_env(); +jobject GDAPI godot_android_get_activity(); + +#ifdef __cplusplus +} +#endif + +#endif /* !GODOT_ANDROID_GDN_H */ diff --git a/modules/gdnative/include/arvr/godot_arvr.h b/modules/gdnative/include/arvr/godot_arvr.h index b9aedc0bef..63de62b507 100644 --- a/modules/gdnative/include/arvr/godot_arvr.h +++ b/modules/gdnative/include/arvr/godot_arvr.h @@ -37,7 +37,15 @@ extern "C" { #endif +// For future versions of the API we should only add new functions at the end of the structure and use the +// version info to detect whether a call is available + +// Use these to populate version in your plugin +#define GODOTVR_API_MAJOR 1 +#define GODOTVR_API_MINOR 0 + typedef struct { + godot_gdnative_api_version version; /* version of our API */ void *(*constructor)(godot_object *); void (*destructor)(void *); godot_string (*get_name)(const void *); diff --git a/modules/gdnative/include/nativescript/godot_nativescript.h b/modules/gdnative/include/nativescript/godot_nativescript.h index cfbe16fa7d..f28ba352ab 100644 --- a/modules/gdnative/include/nativescript/godot_nativescript.h +++ b/modules/gdnative/include/nativescript/godot_nativescript.h @@ -43,6 +43,9 @@ typedef enum { GODOT_METHOD_RPC_MODE_SYNC, GODOT_METHOD_RPC_MODE_MASTER, GODOT_METHOD_RPC_MODE_SLAVE, + GODOT_METHOD_RPC_MODE_REMOTESYNC, + GODOT_METHOD_RPC_MODE_MASTERSYNC, + GODOT_METHOD_RPC_MODE_SLAVESYNC, } godot_method_rpc_mode; typedef enum { diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index cf8977f3ea..d6abbc1bcf 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -747,7 +747,7 @@ Ref<Script> NativeScriptInstance::get_script() const { return script; } -NativeScriptInstance::RPCMode NativeScriptInstance::get_rpc_mode(const StringName &p_method) const { +MultiplayerAPI::RPCMode NativeScriptInstance::get_rpc_mode(const StringName &p_method) const { NativeScriptDesc *script_data = GET_SCRIPT_DESC(); @@ -757,27 +757,33 @@ NativeScriptInstance::RPCMode NativeScriptInstance::get_rpc_mode(const StringNam if (E) { switch (E->get().rpc_mode) { case GODOT_METHOD_RPC_MODE_DISABLED: - return RPC_MODE_DISABLED; + return MultiplayerAPI::RPC_MODE_DISABLED; case GODOT_METHOD_RPC_MODE_REMOTE: - return RPC_MODE_REMOTE; + return MultiplayerAPI::RPC_MODE_REMOTE; case GODOT_METHOD_RPC_MODE_SYNC: - return RPC_MODE_SYNC; + return MultiplayerAPI::RPC_MODE_SYNC; case GODOT_METHOD_RPC_MODE_MASTER: - return RPC_MODE_MASTER; + return MultiplayerAPI::RPC_MODE_MASTER; case GODOT_METHOD_RPC_MODE_SLAVE: - return RPC_MODE_SLAVE; + return MultiplayerAPI::RPC_MODE_SLAVE; + case GODOT_METHOD_RPC_MODE_REMOTESYNC: + return MultiplayerAPI::RPC_MODE_REMOTESYNC; + case GODOT_METHOD_RPC_MODE_MASTERSYNC: + return MultiplayerAPI::RPC_MODE_MASTERSYNC; + case GODOT_METHOD_RPC_MODE_SLAVESYNC: + return MultiplayerAPI::RPC_MODE_SLAVESYNC; default: - return RPC_MODE_DISABLED; + return MultiplayerAPI::RPC_MODE_DISABLED; } } script_data = script_data->base_data; } - return RPC_MODE_DISABLED; + return MultiplayerAPI::RPC_MODE_DISABLED; } -NativeScriptInstance::RPCMode NativeScriptInstance::get_rset_mode(const StringName &p_variable) const { +MultiplayerAPI::RPCMode NativeScriptInstance::get_rset_mode(const StringName &p_variable) const { NativeScriptDesc *script_data = GET_SCRIPT_DESC(); @@ -787,24 +793,24 @@ NativeScriptInstance::RPCMode NativeScriptInstance::get_rset_mode(const StringNa if (E) { switch (E.get().rset_mode) { case GODOT_METHOD_RPC_MODE_DISABLED: - return RPC_MODE_DISABLED; + return MultiplayerAPI::RPC_MODE_DISABLED; case GODOT_METHOD_RPC_MODE_REMOTE: - return RPC_MODE_REMOTE; + return MultiplayerAPI::RPC_MODE_REMOTE; case GODOT_METHOD_RPC_MODE_SYNC: - return RPC_MODE_SYNC; + return MultiplayerAPI::RPC_MODE_SYNC; case GODOT_METHOD_RPC_MODE_MASTER: - return RPC_MODE_MASTER; + return MultiplayerAPI::RPC_MODE_MASTER; case GODOT_METHOD_RPC_MODE_SLAVE: - return RPC_MODE_SLAVE; + return MultiplayerAPI::RPC_MODE_SLAVE; default: - return RPC_MODE_DISABLED; + return MultiplayerAPI::RPC_MODE_DISABLED; } } script_data = script_data->base_data; } - return RPC_MODE_DISABLED; + return MultiplayerAPI::RPC_MODE_DISABLED; } ScriptLanguage *NativeScriptInstance::get_language() { diff --git a/modules/gdnative/nativescript/nativescript.h b/modules/gdnative/nativescript/nativescript.h index 68a8126a32..b47962dc37 100644 --- a/modules/gdnative/nativescript/nativescript.h +++ b/modules/gdnative/nativescript/nativescript.h @@ -196,8 +196,8 @@ public: virtual Variant call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error); virtual void notification(int p_notification); virtual Ref<Script> get_script() const; - virtual RPCMode get_rpc_mode(const StringName &p_method) const; - virtual RPCMode get_rset_mode(const StringName &p_variable) const; + virtual MultiplayerAPI::RPCMode get_rpc_mode(const StringName &p_method) const; + virtual MultiplayerAPI::RPCMode get_rset_mode(const StringName &p_variable) const; virtual ScriptLanguage *get_language(); virtual void call_multilevel(const StringName &p_method, const Variant **p_args, int p_argcount); diff --git a/modules/gdnative/pluginscript/pluginscript_instance.cpp b/modules/gdnative/pluginscript/pluginscript_instance.cpp index 931ab0bfe4..13026e8e7a 100644 --- a/modules/gdnative/pluginscript/pluginscript_instance.cpp +++ b/modules/gdnative/pluginscript/pluginscript_instance.cpp @@ -138,11 +138,11 @@ void PluginScriptInstance::notification(int p_notification) { _desc->notification(_data, p_notification); } -ScriptInstance::RPCMode PluginScriptInstance::get_rpc_mode(const StringName &p_method) const { +MultiplayerAPI::RPCMode PluginScriptInstance::get_rpc_mode(const StringName &p_method) const { return _script->get_rpc_mode(p_method); } -ScriptInstance::RPCMode PluginScriptInstance::get_rset_mode(const StringName &p_variable) const { +MultiplayerAPI::RPCMode PluginScriptInstance::get_rset_mode(const StringName &p_variable) const { return _script->get_rset_mode(p_variable); } diff --git a/modules/gdnative/pluginscript/pluginscript_instance.h b/modules/gdnative/pluginscript/pluginscript_instance.h index 3c7b360ad9..8be6a4ccaa 100644 --- a/modules/gdnative/pluginscript/pluginscript_instance.h +++ b/modules/gdnative/pluginscript/pluginscript_instance.h @@ -76,8 +76,8 @@ public: void set_path(const String &p_path); - virtual RPCMode get_rpc_mode(const StringName &p_method) const; - virtual RPCMode get_rset_mode(const StringName &p_variable) const; + virtual MultiplayerAPI::RPCMode get_rpc_mode(const StringName &p_method) const; + virtual MultiplayerAPI::RPCMode get_rset_mode(const StringName &p_variable) const; virtual void refcount_incremented(); virtual bool refcount_decremented(); diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp index 5ae7926f1b..c3a623e9a1 100644 --- a/modules/gdnative/pluginscript/pluginscript_script.cpp +++ b/modules/gdnative/pluginscript/pluginscript_script.cpp @@ -84,35 +84,20 @@ StringName PluginScript::get_instance_base_type() const { } void PluginScript::update_exports() { -// TODO #ifdef TOOLS_ENABLED -#if 0 ASSERT_SCRIPT_VALID(); - if (/*changed &&*/ placeholders.size()) { //hm :( + if (placeholders.size()) { //update placeholders if any Map<StringName, Variant> propdefvalues; List<PropertyInfo> propinfos; - const String *props = (const String *)pybind_get_prop_list(_py_exposed_class); - for (int i = 0; props[i] != ""; ++i) { - const String propname = props[i]; - pybind_get_prop_default_value(_py_exposed_class, propname.c_str(), (godot_variant *)&propdefvalues[propname]); - pybind_prop_info raw_info; - pybind_get_prop_info(_py_exposed_class, propname.c_str(), &raw_info); - PropertyInfo info; - info.type = (Variant::Type)raw_info.type; - info.name = propname; - info.hint = (PropertyHint)raw_info.hint; - info.hint_string = *(String *)&raw_info.hint_string; - info.usage = raw_info.usage; - propinfos.push_back(info); - } + + get_script_property_list(&propinfos); for (Set<PlaceHolderScriptInstance *>::Element *E = placeholders.front(); E; E = E->next()) { - E->get()->update(propinfos, propdefvalues); + E->get()->update(propinfos, _properties_default_values); } } #endif -#endif } // TODO: rename p_this "p_owner" ? @@ -245,9 +230,9 @@ Error PluginScript::reload(bool p_keep_state) { // rpc_mode is passed as an optional field and is not part of MethodInfo Variant var = v["rpc_mode"]; if (var == Variant()) { - _methods_rpc_mode[mi.name] = ScriptInstance::RPC_MODE_DISABLED; + _methods_rpc_mode[mi.name] = MultiplayerAPI::RPC_MODE_DISABLED; } else { - _methods_rpc_mode[mi.name] = ScriptInstance::RPCMode(int(var)); + _methods_rpc_mode[mi.name] = MultiplayerAPI::RPCMode(int(var)); } } Array *signals = (Array *)&manifest.signals; @@ -265,9 +250,9 @@ Error PluginScript::reload(bool p_keep_state) { // rset_mode is passed as an optional field and is not part of PropertyInfo Variant var = v["rset_mode"]; if (var == Variant()) { - _methods_rpc_mode[pi.name] = ScriptInstance::RPC_MODE_DISABLED; + _methods_rpc_mode[pi.name] = MultiplayerAPI::RPC_MODE_DISABLED; } else { - _methods_rpc_mode[pi.name] = ScriptInstance::RPCMode(int(var)); + _methods_rpc_mode[pi.name] = MultiplayerAPI::RPCMode(int(var)); } } // Manifest's attributes must be explicitly freed @@ -402,23 +387,23 @@ int PluginScript::get_member_line(const StringName &p_member) const { return -1; } -ScriptInstance::RPCMode PluginScript::get_rpc_mode(const StringName &p_method) const { - ASSERT_SCRIPT_VALID_V(ScriptInstance::RPC_MODE_DISABLED); - const Map<StringName, ScriptInstance::RPCMode>::Element *e = _methods_rpc_mode.find(p_method); +MultiplayerAPI::RPCMode PluginScript::get_rpc_mode(const StringName &p_method) const { + ASSERT_SCRIPT_VALID_V(MultiplayerAPI::RPC_MODE_DISABLED); + const Map<StringName, MultiplayerAPI::RPCMode>::Element *e = _methods_rpc_mode.find(p_method); if (e != NULL) { return e->get(); } else { - return ScriptInstance::RPC_MODE_DISABLED; + return MultiplayerAPI::RPC_MODE_DISABLED; } } -ScriptInstance::RPCMode PluginScript::get_rset_mode(const StringName &p_variable) const { - ASSERT_SCRIPT_VALID_V(ScriptInstance::RPC_MODE_DISABLED); - const Map<StringName, ScriptInstance::RPCMode>::Element *e = _variables_rset_mode.find(p_variable); +MultiplayerAPI::RPCMode PluginScript::get_rset_mode(const StringName &p_variable) const { + ASSERT_SCRIPT_VALID_V(MultiplayerAPI::RPC_MODE_DISABLED); + const Map<StringName, MultiplayerAPI::RPCMode>::Element *e = _variables_rset_mode.find(p_variable); if (e != NULL) { return e->get(); } else { - return ScriptInstance::RPC_MODE_DISABLED; + return MultiplayerAPI::RPC_MODE_DISABLED; } } diff --git a/modules/gdnative/pluginscript/pluginscript_script.h b/modules/gdnative/pluginscript/pluginscript_script.h index 1be9e907c2..31c6c4d67f 100644 --- a/modules/gdnative/pluginscript/pluginscript_script.h +++ b/modules/gdnative/pluginscript/pluginscript_script.h @@ -62,8 +62,8 @@ private: Map<StringName, PropertyInfo> _properties_info; Map<StringName, MethodInfo> _signals_info; Map<StringName, MethodInfo> _methods_info; - Map<StringName, ScriptInstance::RPCMode> _variables_rset_mode; - Map<StringName, ScriptInstance::RPCMode> _methods_rpc_mode; + Map<StringName, MultiplayerAPI::RPCMode> _variables_rset_mode; + Map<StringName, MultiplayerAPI::RPCMode> _methods_rpc_mode; Set<Object *> _instances; //exported members @@ -116,8 +116,8 @@ public: virtual int get_member_line(const StringName &p_member) const; - ScriptInstance::RPCMode get_rpc_mode(const StringName &p_method) const; - ScriptInstance::RPCMode get_rset_mode(const StringName &p_variable) const; + MultiplayerAPI::RPCMode get_rpc_mode(const StringName &p_method) const; + MultiplayerAPI::RPCMode get_rset_mode(const StringName &p_variable) const; PluginScript(); void init(PluginScriptLanguage *language); |