Exemplo n.º 1
0
        public void LoadHashTable()
        {
            if (!isProxyValid())
            {
                return;
            }

            string _tag = uniqueTag.Value;

            if (string.IsNullOrEmpty(_tag))
            {
                _tag = Fsm.GameObjectName + "/" + Fsm.Name + "/hashTable/" + reference;
            }

            ES2Settings loadSettings = new ES2Settings();

            if (loadFromResources.Value)
            {
                loadSettings.saveLocation = ES2Settings.SaveLocation.Resources;
            }

            Dictionary <string, string> _dict = ES2.LoadDictionary <string, string>(saveFile.Value + "?tag=" + _tag);

            Log("Loaded from " + saveFile.Value + "?tag=" + _tag);

            proxy.hashTable.Clear();


            foreach (string key in _dict.Keys)
            {
                proxy.hashTable[key] = PlayMakerUtils.ParseValueFromString(_dict[key]);
            }

            Finish();
        }
Exemplo n.º 2
0
    public ES2Settings Clone(string identifier)
    {
        ES2Settings settings = Clone();

        settings.filenameData = new ES2FilenameData(identifier, settings, true);
        return(settings);
    }
Exemplo n.º 3
0
        public void LoadArrayList()
        {
            if (!isProxyValid())
            {
                return;
            }

            string _tag = uniqueTag.Value;

            if (string.IsNullOrEmpty(_tag))
            {
                _tag = Fsm.GameObjectName + "/" + Fsm.Name + "/arraylist/" + reference.Value;
            }

            ES2Settings loadSettings = new ES2Settings();

            if (loadFromResources.Value)
            {
                loadSettings.saveLocation = ES2Settings.SaveLocation.Resources;
            }

            List <string> source = ES2.LoadList <string>(saveFile.Value + "?tag=" + _tag);

            Log("Loaded from " + saveFile.Value + "?tag=" + uniqueTag);

            proxy.arrayList.Clear();

            foreach (string element in source)
            {
                proxy.arrayList.Add(PlayMakerUtils.ParseValueFromString(element));
            }

            Finish();
        }
Exemplo n.º 4
0
    public static Dictionary <TKey, TValue> LoadDictionary <TKey, TValue>(string identifier, ES2Settings settings)
    {
        ES2Settings newSettings = settings.Clone(identifier);

        using (ES2Reader reader = ES2Reader.Create(newSettings))
            return(reader.ReadDictionary <TKey, TValue>(newSettings.filenameData.tag));
    }
Exemplo n.º 5
0
    public static byte[] LoadRaw(string identifier, ES2Settings settings)
    {
        ES2Settings newSettings = settings.Clone(identifier);

        using (ES2Reader reader = ES2Reader.Create(newSettings))
            return(reader.ReadRaw());
    }
Exemplo n.º 6
0
    public static void LoadArray <T>(string identifier, T[] c) where T : class
    {
        ES2Settings newSettings = new ES2Settings(identifier);

        using (ES2Reader reader = ES2Reader.Create(newSettings))
            reader.ReadArray <T>(newSettings.filenameData.tag, c);
    }
Exemplo n.º 7
0
    public void Save(string path, ES2Settings settings)
    {
        if (append)        // If append is enabled, set file stream to append.
        {
            settings.fileMode = ES2Settings.ES2FileMode.Append;
        }

        using (ES2Writer writer = ES2Writer.Create(path, settings))
        {
            for (int rowNo = 0; rowNo < sheet.Count; rowNo++)        // For each row ...
            {
                ES2SpreadsheetRow row = sheet[rowNo];

                if (row != null)                                        // If row is set ...
                {
                    for (int colNo = 0; colNo < row.cellCount; colNo++) // Write each cell.
                    {
                        if (colNo != 0)                                 // Only prepend a comma if this isn't the first column.
                        {
                            writer.WriteRaw(comma);
                        }
                        writer.WriteRaw(row.GetCellBytes(colNo));
                    }
                }
                writer.WriteRaw(newline);                  // Write a newline to signify the end of the row.
            }
            writer.Save(false);
        }
    }
Exemplo n.º 8
0
 public ES2Reader(ES2Settings settings)
 {
     this.settings = settings;
     this.stream   = ES2Stream.Create(settings, ES2Stream.Operation.Read);
     this.reader   = new BinaryReader(stream.stream);
     cachedFile    = ES2Cache.GetCachedFile(settings.filenameData.filePath);
 }
Exemplo n.º 9
0
 public ES2Header(ES2Keys.Key collectionType, int keyType, int valueType, ES2Settings settings)
 {
     this.collectionType = collectionType;
     this.keyType        = keyType;
     this.valueType      = valueType;
     this.settings       = settings;
 }
Exemplo n.º 10
0
    public static void LoadList <T>(string identifier, List <T> c, ES2Settings settings) where T : class
    {
        ES2Settings newSettings = settings.Clone(identifier);

        using (ES2Reader reader = ES2Reader.Create(newSettings))
            reader.ReadList <T>(newSettings.filenameData.tag, c);
    }
Exemplo n.º 11
0
    public static Queue <T> LoadQueue <T>(string identifier)
    {
        ES2Settings newSettings = new ES2Settings(identifier);

        using (ES2Reader reader = ES2Reader.Create(newSettings))
            return(reader.ReadQueue <T>(newSettings.filenameData.tag));
    }
Exemplo n.º 12
0
 public static string[] GetTags(ES2Settings settings)
 {
     using (ES2Reader reader = ES2Reader.Create(settings))
     {
         return(reader.GetTags());
     }
 }
Exemplo n.º 13
0
    public static Stack <T> LoadStack <T>(string identifier, ES2Settings settings)
    {
        ES2Settings newSettings = settings.Clone(identifier);

        using (ES2Reader reader = ES2Reader.Create(newSettings))
            return(reader.ReadStack <T>(newSettings.filenameData.tag));
    }
Exemplo n.º 14
0
    public static ES2Data LoadAll(string path)
    {
        ES2Settings settings = new ES2Settings(path);

        using (ES2Reader reader = ES2Reader.Create(settings))
            return(reader.ReadAll());
    }
Exemplo n.º 15
0
    public static ES2Data LoadAll(string identifier, ES2Settings settings)
    {
        ES2Settings newSettings = settings.Clone(identifier);

        using (ES2Reader reader = ES2Reader.Create(newSettings))
            return(reader.ReadAll());
    }
Exemplo n.º 16
0
    public ES2Settings Clone()
    {
        ES2Settings settings = new ES2Settings();

        settings.filenameData       = filenameData;
        settings.saveLocation       = saveLocation;
        settings.optimizeMode       = optimizeMode;
        settings.encrypt            = encrypt;
        settings.encryptionPassword = encryptionPassword;
        settings.encryptionType     = encryptionType;
        settings.webUsername        = webUsername;
        settings.webPassword        = webPassword;
        settings.webFilename        = webFilename;
        settings.saveNormals        = saveNormals;
        settings.saveColors         = saveColors;
        settings.saveUV             = saveUV;
        settings.saveUV2            = saveUV2;
        settings.saveTangents       = saveTangents;
        settings.saveSubmeshes      = saveSubmeshes;
        settings.saveSkinning       = saveSkinning;
        settings.meshSettingsCount  = meshSettingsCount;
        settings.name     = name;
        settings.fileMode = fileMode;

        return(settings);
    }
Exemplo n.º 17
0
        protected override void Init()
        {
            base.Init();

            if (saveConf != null)
            {
                default_EasySaveFileName = saveConf.Default_EasySaveFileName;
                fileNameExtensions       = saveConf.FileNameExtensions;

                es2Settings = new ES2Settings();

                es2Settings.encrypt            = saveConf.EncryptsData;
                es2Settings.encryptionPassword = saveConf.EncryptionPassword;
                es2Settings.saveLocation       = saveConf.SaveLocation;
            }

#if UNITY_EDITOR || UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX
            globalSavePath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments) + "/" + Application.companyName + "/" + Application.productName;
#endif

#if UNITY_IPHONE || UNITY_ANDROID
            globalSavePath = Application.persistentDataPath;
#endif

            Debug.Log(globalSavePath);
        }
Exemplo n.º 18
0
 public static ES2Stream Create(ES2Settings settings, Operation operation)
 {
     // Web
     if (settings.filenameData.IsURL())
     {
         return(new ES2MemoryStream(settings));
     }
     // File
     else if (settings.saveLocation == ES2Settings.SaveLocation.File)
     {
         if (Application.platform == RuntimePlatform.WebGLPlayer)
         {
             Debug.LogError("Easy Save 2 Error: You cannot load from file on this platform. Loading from PlayerPrefs instead.");
             return(new ES2PlayerPrefsStream(settings, operation));
         }
         return(new ES2FileStream(settings, operation));
     }
     // Memory
     else if (settings.saveLocation == ES2Settings.SaveLocation.Memory)
     {
         return(new ES2MemoryStream(settings));
     }
     // PlayerPrefs
     else if (settings.saveLocation == ES2Settings.SaveLocation.PlayerPrefs)
     {
         return(new ES2PlayerPrefsStream(settings, operation));
     }
     // Resources
     else if (settings.saveLocation == ES2Settings.SaveLocation.Resources)
     {
         return(new ES2ResourcesStream(settings));
     }
     return(null);
 }
Exemplo n.º 19
0
    public static System.Object LoadObject(string identifier, ES2Settings settings)
    {
        ES2Settings newSettings = settings.Clone(identifier);

        using (ES2Reader reader = ES2Reader.Create(newSettings))
            return(reader.ReadObject(newSettings.filenameData.tag));
    }
Exemplo n.º 20
0
    public void AddTag(string tag, Type type)
    {
        ES2Settings settings = new ES2Settings();

        settings.tag = tag;
        ES2.Save(ES2EditorType.Get(type).CreateInstance(), currentFilePath, settings);
        OpenFile();
    }
Exemplo n.º 21
0
    private ES2Reader GetEncryptedReader()
    {
        ES2Settings encryptedSettings = new ES2Settings();

        encryptedSettings.saveLocation = ES2Settings.SaveLocation.Memory;
        // Make sure encrypt=false so we don't enter an infinite loop/Stackoverflow situation.
        encryptedSettings.encrypt = false;
        return(ES2Reader.Create(GetDecryptedBytes(), encryptedSettings));
    }
Exemplo n.º 22
0
	/* Creates an ES2Settings objects from the user
	 * defined settings */
	private ES2Settings CreateSettings()
	{
		ES2Settings settings = new ES2Settings();
		settings.webFilename = filename;
		settings.tag = textureTag;
		settings.webUsername = webUsername;
		settings.webPassword = webPassword;
		return settings;
	}
Exemplo n.º 23
0
    /* Creates an ES2Settings objects from the user
     * defined settings */
    private ES2Settings CreateSettings()
    {
        ES2Settings settings = new ES2Settings();

        settings.webFilename = filename;
        settings.tag         = textureTag;
        settings.webUsername = webUsername;
        settings.webPassword = webPassword;
        return(settings);
    }
Exemplo n.º 24
0
    public static void Save <T>(T[] param, string identifier)
    {
        ES2Settings newSettings = new ES2Settings(identifier);

        using (ES2Writer mWriter = ES2Writer.Create(newSettings))
        {
            mWriter.Write <T>(param, newSettings.filenameData.tag);
            mWriter.Save();
        }
    }
Exemplo n.º 25
0
    public static void Save <TKey, TValue>(Dictionary <TKey, TValue> param, string identifier, ES2Settings settings)
    {
        ES2Settings newSettings = settings.Clone(identifier);

        using (ES2Writer mWriter = ES2Writer.Create(newSettings))
        {
            mWriter.Write <TKey, TValue>(param, newSettings.filenameData.tag);
            mWriter.Save();
        }
    }
Exemplo n.º 26
0
    public static void SaveRaw(TextAsset param, string identifier, ES2Settings settings)
    {
        ES2Settings newSettings = settings.Clone(identifier);

        using (ES2Writer mWriter = ES2Writer.Create(newSettings))
        {
            mWriter.WriteRaw(param.bytes);
            mWriter.Save(false);
        }
    }
Exemplo n.º 27
0
    public static void SaveRaw(byte[] param, string identifier)
    {
        ES2Settings newSettings = new ES2Settings(identifier);

        using (ES2Writer mWriter = ES2Writer.Create(newSettings))
        {
            mWriter.WriteRaw(param);
            mWriter.Save(false);
        }
    }
Exemplo n.º 28
0
    public static void Save2DArray <T>(T[,] param, string identifier, ES2Settings settings)
    {
        ES2Settings newSettings = settings.Clone(identifier);

        using (ES2Writer mWriter = ES2Writer.Create(newSettings))
        {
            mWriter.Write <T>(param, newSettings.filenameData.tag);
            mWriter.Save();
        }
    }
Exemplo n.º 29
0
 /// <summary>
 /// Handles ES2 Configuration
 /// </summary>
 private void ConfigureSettings()
 {
     settings = new ES2Settings(file)
     {
         tag                = SanitizeTag("AppData"),
         encrypt            = true,
         encryptionType     = ES2Settings.EncryptionType.AES128,
         encryptionPassword = "******"
     };
 }
Exemplo n.º 30
0
    public static void AppendRaw(byte[] param, string identifier, ES2Settings settings)
    {
        ES2Settings newSettings = settings.Clone(identifier);

        newSettings.fileMode = ES2Settings.ES2FileMode.Append;
        using (ES2Writer mWriter = ES2Writer.Create(newSettings))
        {
            mWriter.WriteRaw(param);
            mWriter.Save(false);
        }
    }
Exemplo n.º 31
0
    public static void AppendRaw(TextAsset param, string identifier)
    {
        ES2Settings newSettings = new ES2Settings(identifier);

        newSettings.fileMode = ES2Settings.ES2FileMode.Append;
        using (ES2Writer mWriter = ES2Writer.Create(newSettings))
        {
            mWriter.WriteRaw(param.bytes);
            mWriter.Save(false);
        }
    }
Exemplo n.º 32
0
		public static FsmArray LoadArray(ref FsmArray array,string filename,ES2Settings setting){
			
//			FsmArray array=new FsmArray();
			VariableType t=array.ElementType;
			
			switch(t){
			case VariableType.Bool:{
					bool[] bs=ES2.LoadArray<bool>(filename, setting);
//					array.Values=(object[])bs;
//					array.Values=bs;
					array.Resize(bs.Length);
					for(int i=0;i<bs.Length;i++){
						array.Set(i,(object)bs[i]);
					}
					break;
				}
			case VariableType.Int:{
					int[] bs=ES2.LoadArray<int>(filename, setting);
//					array.intValues=ints;
					array.Resize(bs.Length);
					for(int i=0;i<bs.Length;i++){
						array.Set(i,(object)bs[i]);
					}
					break;
				}
			case VariableType.Float:{
					float[]bs=ES2.LoadArray<float>(filename, setting);
					array.Resize(bs.Length);
					for(int i=0;i<bs.Length;i++){
						array.Set(i,(object)bs[i]);
					}
					break;
				}
			case VariableType.String:{
					string[]bs=ES2.LoadArray<string>(filename, setting);
					array.Resize(bs.Length);
					for(int i=0;i<bs.Length;i++){
						array.Set(i,(object)bs[i]);
					}
					break;
				}
			default:{
					break;
				}
			}

			return array;
		}
Exemplo n.º 33
0
		public static void SaveArray(FsmArray array,string filename,ES2Settings setting){
			VariableType t= array.ElementType;
			object[] os;
			switch(t){
			case VariableType.Bool:{
					os=array.Values;
					bool[] bs=new bool[os.Length];
					for(int i=0;i<bs.Length;i++){
						bs[i]=(bool)os[i];
					}
					ES2.Save(bs, filename, setting);
					break;
				}
			case VariableType.Int:{
					os=array.Values;
					int[] ins=new int[os.Length];
					for(int i=0;i<ins.Length;i++){
						ins[i]=(int)os[i];
					}
					ES2.Save(ins, filename, setting);
					break;
				}
			case VariableType.Float:{
					os=array.Values;
					float[] fs=new float[os.Length];
					for(int i=0;i<fs.Length;i++){
						fs[i]=(float)os[i];
					}
					ES2.Save(fs, filename, setting);
					break;
				}
			case VariableType.String:{
					os=array.Values;
					string[] ss=new string[os.Length];
					for(int i=0;i<ss.Length;i++){
						ss[i]=(string)os[i];
					}
					ES2.Save(ss, filename, setting);
					break;
				}
			default:{
					break;
				}
			}
		}
Exemplo n.º 34
0
		public override void OnEnter()
		{
			try
			{
				ES2Settings settings = new ES2Settings();
				settings.encrypt = encrypt.Value;
				settings.encryptionPassword = encryptionPassword.Value;
				if(usePlayerPrefs.Value)
					settings.saveLocation = ES2Settings.SaveLocation.PlayerPrefs;

				// Get FSMVariables objects required based on whether the user wants to save
				// local variables, global variables or both.
				FsmVariables[] fsmVariables;
				if(saveFsmVariables.Value && saveGlobalVariables.Value)
					fsmVariables = new FsmVariables[]{Fsm.Variables, FsmVariables.GlobalVariables};
				else if(saveFsmVariables.Value && !saveGlobalVariables.Value)
					fsmVariables = new FsmVariables[]{Fsm.Variables};
				else if(!saveFsmVariables.Value && saveGlobalVariables.Value)
					fsmVariables = new FsmVariables[]{FsmVariables.GlobalVariables};
				else
					fsmVariables = new FsmVariables[0];

				foreach(FsmVariables fsmVariable in fsmVariables)
				{
					// Variables are stored in seperate arrays based on their types.
					// Save each item in each array seperately.
					foreach(FsmBool fsmVar in fsmVariable.BoolVariables)
					{
						settings.tag = fsmVar.Name;
						ES2.Save(fsmVar.Value, filename.Value, settings);
					}
					foreach(FsmArray fsmVar in fsmVariable.ArrayVariables){
						settings.tag=fsmVar.Name;
						EasySaveArrayTools.SaveArray(fsmVar,filename.Value,settings);
					}
					foreach(FsmFloat fsmVar in fsmVariable.FloatVariables)
					{
						settings.tag = fsmVar.Name;
						ES2.Save(fsmVar.Value, filename.Value, settings);
					}

					foreach(FsmInt fsmVar in fsmVariable.IntVariables)
					{
						settings.tag = fsmVar.Name;
						ES2.Save(fsmVar.Value, filename.Value, settings);
					}

					foreach(FsmString fsmVar in fsmVariable.StringVariables)
					{
						settings.tag = fsmVar.Name;
						ES2.Save(fsmVar.Value, filename.Value, settings);
					}

					foreach(FsmVector2 fsmVar in fsmVariable.Vector2Variables)
					{
						settings.tag = fsmVar.Name;
						ES2.Save(fsmVar.Value, filename.Value, settings);
					}

					foreach(FsmVector3 fsmVar in fsmVariable.Vector3Variables)
					{
						settings.tag = fsmVar.Name;
						ES2.Save(fsmVar.Value, filename.Value, settings);
					}

					foreach(FsmRect fsmVar in fsmVariable.RectVariables)
					{
						settings.tag = fsmVar.Name;
						ES2.Save(fsmVar.Value, filename.Value, settings);
					}

					foreach(FsmQuaternion fsmVar in fsmVariable.QuaternionVariables)
					{
						settings.tag = fsmVar.Name;
						ES2.Save(fsmVar.Value, filename.Value, settings);
					}

					foreach(FsmColor fsmVar in fsmVariable.ColorVariables)
					{
						settings.tag = fsmVar.Name;
						ES2.Save(fsmVar.Value, filename.Value, settings);
					}

					foreach(FsmMaterial fsmVar in fsmVariable.MaterialVariables)
					{
						settings.tag = fsmVar.Name;
						ES2.Save(fsmVar.Value, filename.Value, settings);
					}

					foreach(FsmTexture fsmVar in fsmVariable.TextureVariables)
					{
						settings.tag = fsmVar.Name;
						ES2.Save(fsmVar.Value as Texture2D, filename.Value, settings);
					}

					foreach(FsmObject fsmVar in fsmVariable.ObjectVariables)
					{
						settings.tag = fsmVar.Name;
						ES2.Save(fsmVar.Value, filename.Value, settings);
					}
				}

				Log("Saved to "+filename.Value);
				Finish();
			}
			catch(Exception e)
			{
				if(ifError != null)
					Fsm.Event(ifError);
				else
					LogError (e.Message);
			}
		}
Exemplo n.º 35
0
		public override void OnEnter()
		{
			try
			{
				if(!ES2.Exists(filename.Value))
				{
					Finish();
					return;
				}

				ES2Settings settings = new ES2Settings(filename.Value);
				settings.encrypt = encrypt.Value;
				settings.encryptionPassword = encryptionPassword.Value;
				if(usePlayerPrefs.Value)
					settings.saveLocation = ES2Settings.SaveLocation.PlayerPrefs;

				ES2Data es2Data = ES2.LoadAll(filename.Value, settings);

				if(es2Data.loadedData.Count < 1)
				{
					Finish();
					return;
				}

				// Get FSMVariables objects required based on whether the user wants to save
				// local variables, global variables or both.
				FsmVariables[] fsmVariables;
				if(loadFsmVariables.Value && loadGlobalVariables.Value)
					fsmVariables = new FsmVariables[]{Fsm.Variables, FsmVariables.GlobalVariables};
				else if(loadFsmVariables.Value && !loadGlobalVariables.Value)
					fsmVariables = new FsmVariables[]{Fsm.Variables};
				else if(!loadFsmVariables.Value && loadGlobalVariables.Value)
					fsmVariables = new FsmVariables[]{FsmVariables.GlobalVariables};
				else
					fsmVariables = new FsmVariables[0];

				foreach(KeyValuePair<string, object> entry in es2Data.loadedData)
				{
					bool arrayMark=false;
					ES2Type es2Type = ES2TypeManager.GetES2Type(entry.Value.GetType());						
					if(es2Type == null){
						var obj=entry.Value;
						string fn=obj.GetType().FullName;
						if(obj.GetType()!=typeof(object[]))
							continue;
						arrayMark=true;
					}

					foreach(FsmVariables variable in fsmVariables)
					{	
						if(arrayMark){
							FsmArray thisVar=variable.FindFsmArray(entry.Key);
							if(thisVar!=null){
								thisVar.Values=(object[])entry.Value;
							}
							continue;
						}

						if(es2Type.type == typeof(bool))
						{
							FsmBool thisVar = variable.FindFsmBool(entry.Key);
							if(thisVar != null)
								thisVar.Value = es2Data.Load<bool>(entry.Key);
						}
						else if(es2Type.type == typeof(float))
						{
							FsmFloat thisVar = variable.FindFsmFloat(entry.Key);
							if(thisVar != null)
								thisVar.Value = es2Data.Load<float>(entry.Key);
						}
						else if(es2Type.type == typeof(int))
						{
							FsmInt thisVar = variable.FindFsmInt(entry.Key);
							if(thisVar != null)
								thisVar.Value =es2Data.Load<int>(entry.Key);
						}
						else if(es2Type.type == typeof(string))
						{
							FsmString thisVar = variable.FindFsmString(entry.Key);
							if(thisVar != null)
								thisVar.Value = es2Data.Load<string>(entry.Key);
						}
						else if(es2Type.type == typeof(Vector2))
						{
							FsmVector2 thisVar = variable.FindFsmVector2(entry.Key);
							if(thisVar != null)
								thisVar.Value =es2Data.Load<Vector2>(entry.Key);
						}
						else if(es2Type.type == typeof(Vector3))
						{
							FsmVector3 thisVar = variable.FindFsmVector3(entry.Key);
							if(thisVar != null)
								thisVar.Value =es2Data.Load<Vector3>(entry.Key);
						}
						else if(es2Type.type == typeof(Rect))
						{
							FsmRect thisVar = variable.FindFsmRect(entry.Key);
							if(thisVar != null)
								thisVar.Value = es2Data.Load<Rect>(entry.Key);
						}
						else if(es2Type.type == typeof(Quaternion))
						{
							FsmQuaternion thisVar = variable.FindFsmQuaternion(entry.Key);
							if(thisVar != null)
								thisVar.Value =es2Data.Load<Quaternion>(entry.Key);
						}
						else if(es2Type.type == typeof(Color))
						{
							FsmColor thisVar = variable.FindFsmColor(entry.Key);
							if(thisVar != null)
								thisVar.Value = es2Data.Load<Color>(entry.Key);
						}
						else if(es2Type.type == typeof(Material))
						{
							FsmMaterial thisVar = variable.FindFsmMaterial(entry.Key);
							if(thisVar != null)
								thisVar.Value = es2Data.Load<Material>(entry.Key);
						}
						else if(es2Type.type == typeof(Texture2D))
						{
							FsmTexture thisVar = variable.FindFsmTexture(entry.Key);
							if(thisVar != null)
								thisVar.Value = es2Data.Load<Texture2D>(entry.Key);
						}
						else
						{
							FsmObject thisVar = variable.FindFsmObject(entry.Key);
							if(thisVar != null)
								thisVar.Value = entry.Value as UnityEngine.Object;
						}
					}
				}

				Log("Loaded from "+filename.Value);
				Finish();
			}
			catch(System.Exception e)
			{
				if(ifError != null)
				{
					LogError(e.Message);
					Fsm.Event(ifError);
				}
			}
		}