diff --git a/Client/Unity/GameObjectRegistry.cs b/Client/Unity/GameObjectRegistry.cs index 6a2482a..684054f 100644 --- a/Client/Unity/GameObjectRegistry.cs +++ b/Client/Unity/GameObjectRegistry.cs @@ -8,11 +8,12 @@ public class GameObjectRegistry : MonoBehaviour public static GameObjectRegistry instance; //instance of gameobject registry in scene public string uuid; //unique identifier for this client public List gameObjects; //list to make it easy to register new gameobjects - public List ids; + public List types; + public Dictionary registry = new Dictionary(); //registry of game objects that can be synced (needs to be identical on both clients public List registeredObjects = new List(); //game objcets that are currently being synced - + void Start() { GameObjectRegistry.instance = this; @@ -25,7 +26,7 @@ public class GameObjectRegistry : MonoBehaviour void initializeRegistry() { int i = 0; - foreach (string id in ids) + foreach (string id in types) { registry.Add(id, gameObjects[i]); i++;