Ejemplo n.º 1
0
        public static FileResourcePack GetOrCreateDevResourcePack()
        {
            var packPath = Path.Combine(DataLocation.localApplicationData, "DevResourcePack");

            try {
                var pack = FileResourcePack.Deserialize(packPath);

                if (pack == null)
                {
                    pack = new FileResourcePack {
                        Path = packPath,
                        Name = "Dev Pack"
                    };
                    Directory.CreateDirectory(packPath);
                    FileResourcePack.SerializeDefinition(pack);
                }

                return(pack);
            } catch (Exception e) {
                UnityEngine.Debug.LogException(e);
                return(null);
            }
        }
Ejemplo n.º 2
0
 public void SaveChanges()
 {
     Directory.CreateDirectory(ActivePack.Path);
     FileResourcePack.SerializeDefinition(ActivePack);
 }