diff --git a/MLAPI/Attributes/SyncedVar.cs b/MLAPI/Attributes/SyncedVar.cs
index d88fa2c..19e7111 100644
--- a/MLAPI/Attributes/SyncedVar.cs
+++ b/MLAPI/Attributes/SyncedVar.cs
@@ -12,5 +12,9 @@ namespace MLAPI.Attributes
/// The method name to invoke when the SyncVar get's updated.
///
public string hook;
+ ///
+ /// If true, the syncedVar will only be synced to the owner.
+ ///
+ public bool target;
}
}
diff --git a/MLAPI/Data/SyncedVarField.cs b/MLAPI/Data/SyncedVarField.cs
new file mode 100644
index 0000000..1d662a1
--- /dev/null
+++ b/MLAPI/Data/SyncedVarField.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+
+namespace MLAPI.Data
+{
+ internal class SyncedVarField
+ {
+ internal FieldInfo FieldInfo;
+ internal FieldType FieldType;
+ internal object FieldValue;
+ internal MethodInfo HookMethod;
+ internal bool Dirty;
+ internal bool Target;
+ }
+}
diff --git a/MLAPI/MLAPI.csproj b/MLAPI/MLAPI.csproj
index 8e56c79..86817ba 100644
--- a/MLAPI/MLAPI.csproj
+++ b/MLAPI/MLAPI.csproj
@@ -73,6 +73,7 @@
+
diff --git a/MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs b/MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs
index e8840ff..31f37e9 100644
--- a/MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs
+++ b/MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs
@@ -202,13 +202,8 @@ namespace MLAPI.MonoBehaviours.Core
}
#region SYNC_VAR
- private List syncedFields = new List();
- internal List syncedFieldTypes = new List();
- private List