diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-05-26 10:30:36 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-05-26 10:49:33 +0200 |
commit | a5e8a3be5e0ed2e7c6b1a9cc5803d96391b180f3 (patch) | |
tree | cd65d4c6371f3e202bce72ce883a15e9bfcd29a5 /modules/mono/csharp_script.cpp | |
parent | 19ba3d5da3ad00907d80c6d8774bf835af4f3f4a (diff) | |
download | redot-engine-a5e8a3be5e0ed2e7c6b1a9cc5803d96391b180f3.tar.gz |
New sync keywords in GDScript, NativeScript, Mono
Diffstat (limited to 'modules/mono/csharp_script.cpp')
-rw-r--r-- | modules/mono/csharp_script.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 4b28746ca8..3cfc376317 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -1320,6 +1320,12 @@ MultiplayerAPI::RPCMode CSharpInstance::_member_get_rpc_mode(GDMonoClassMember * return MultiplayerAPI::RPC_MODE_MASTER; if (p_member->has_attribute(CACHED_CLASS(SlaveAttribute))) return MultiplayerAPI::RPC_MODE_SLAVE; + if (p_member->has_attribute(CACHED_CLASS(RemoteSyncAttribute))) + return MultiplayerAPI::RPC_MODE_REMOTESYNC; + if (p_member->has_attribute(CACHED_CLASS(MasterSyncAttribute))) + return MultiplayerAPI::RPC_MODE_MASTERSYNC; + if (p_member->has_attribute(CACHED_CLASS(SlaveSyncAttribute))) + return MultiplayerAPI::RPC_MODE_SLAVESYNC; return MultiplayerAPI::RPC_MODE_DISABLED; } @@ -1967,15 +1973,15 @@ ScriptInstance *CSharpScript::instance_create(Object *p_this) { return NULL; #endif } - + if (!script_class) { if (GDMono::get_singleton()->get_project_assembly() == NULL) { // The project assembly is not loaded ERR_EXPLAIN("Cannot instance script because the project assembly is not loaded. Script: " + get_path()); ERR_FAIL_V(NULL); } - - // The project assembly is loaded, but the class could not found + + // The project assembly is loaded, but the class could not found ERR_EXPLAIN("Cannot instance script because the class '" + name + "' could not be found. Script: " + get_path()); ERR_FAIL_V(NULL); } |