Exemple #1
0
 public void AddGameObjectInfoDictionary(GameObjectInfo gameObjectInfo)
 {
     if (!GameObjectInfosDic.ContainsKey(gameObjectInfo.UniqueId))
     {
         _gameObjectInfos = gameObjectInfo.GetComponentsInChildren <GameObjectInfo>();
         for (int i = 0; i < _gameObjectInfos.Length; i++)
         {
             try
             {
                 GameObjectInfosDic.Add(_gameObjectInfos[i].UniqueId, _gameObjectInfos[i]);
             }
             catch (Exception)
             {
                 Debug.LogError("There is already a key" + _gameObjectInfos[i].UniqueId + ". Please check.");
             }
         }
     }
 }