Ejemplo n.º 1
0
        /// <summary>
        /// It will perform all necessary steps to serialize and save all configs from the entities on the current project
        /// </summary>
        private static void Save()
        {
            var prefabList = GetPrefabListFromBolt();

            if (prefabList != null && prefabList.Count != 0)
            {
                var updateList = new List <UpdateItem>();

                foreach (var prefabID in prefabList)
                {
                    var go = PrefabDatabase.Find(prefabID);

                    if (go != null)
                    {
                        var updateItem = BuildUpdateItem(go);
                        if (updateItem != null)
                        {
                            updateList.Add(updateItem);
                        }
                    }
                }

                JsonSerializerUpdateUtils.SaveData(updateList, SerializedDataPath);

                BoltLog.Info("Save DONE!");
            }
            else
            {
                BoltLog.Warn("No prefabs found to be serialized");
            }
        }
Ejemplo n.º 2
0
 public GameObject LoadPrefab(PrefabId prefabId)
 {
     return(PrefabDatabase.Find(prefabId));
 }