public override void LoadFromSavedData(string dataKey) { _key = dataKey; bool_2dlist = GDEDataManager.GetBoolTwoDList(_key + "_" + bool_2dlistKey, bool_2dlist); int_2dlist = GDEDataManager.GetIntTwoDList(_key + "_" + int_2dlistKey, int_2dlist); float_2dlist = GDEDataManager.GetFloatTwoDList(_key + "_" + float_2dlistKey, float_2dlist); string_2dlist = GDEDataManager.GetStringTwoDList(_key + "_" + string_2dlistKey, string_2dlist); vector2_2dlist = GDEDataManager.GetVector2TwoDList(_key + "_" + vector2_2dlistKey, vector2_2dlist); vector3_2dlist = GDEDataManager.GetVector3TwoDList(_key + "_" + vector3_2dlistKey, vector3_2dlist); vector4_2dlist = GDEDataManager.GetVector4TwoDList(_key + "_" + vector4_2dlistKey, vector4_2dlist); color_2dlist = GDEDataManager.GetColorTwoDList(_key + "_" + color_2dlistKey, color_2dlist); custom_2dlist = GDEDataManager.GetCustomTwoDList(_key + "_" + custom_2dlistKey, custom_2dlist); }
public override void LoadFromSavedData(string dataKey) { _key = dataKey; b = GDEDataManager.GetBoolTwoDList(_key + "_" + bKey, b); i = GDEDataManager.GetIntTwoDList(_key + "_" + iKey, i); f = GDEDataManager.GetFloatTwoDList(_key + "_" + fKey, f); s = GDEDataManager.GetStringTwoDList(_key + "_" + sKey, s); v2 = GDEDataManager.GetVector2TwoDList(_key + "_" + v2Key, v2); v3 = GDEDataManager.GetVector3TwoDList(_key + "_" + v3Key, v3); v4 = GDEDataManager.GetVector4TwoDList(_key + "_" + v4Key, v4); c = GDEDataManager.GetColorTwoDList(_key + "_" + cKey, c); go = GDEDataManager.GetGameObjectTwoDList(_key + "_" + goKey, go); tex = GDEDataManager.GetTexture2DTwoDList(_key + "_" + texKey, tex); mat = GDEDataManager.GetMaterialTwoDList(_key + "_" + matKey, mat); aud = GDEDataManager.GetAudioClipTwoDList(_key + "_" + audKey, aud); cus = GDEDataManager.GetCustomTwoDList(_key + "_" + cusKey, cus); }
public override void LoadFromSavedData(string dataKey) { _key = dataKey; b = GDEDataManager.GetBoolTwoDList(_key, bKey, b); i = GDEDataManager.GetIntTwoDList(_key, iKey, i); f = GDEDataManager.GetFloatTwoDList(_key, fKey, f); s = GDEDataManager.GetStringTwoDList(_key, sKey, s); v2 = GDEDataManager.GetVector2TwoDList(_key, v2Key, v2); v3 = GDEDataManager.GetVector3TwoDList(_key, v3Key, v3); v4 = GDEDataManager.GetVector4TwoDList(_key, v4Key, v4); c = GDEDataManager.GetColorTwoDList(_key, cKey, c); go = GDEDataManager.GetUnityObjectTwoDList(_key, goKey, go); tex = GDEDataManager.GetUnityObjectTwoDList(_key, texKey, tex); mat = GDEDataManager.GetUnityObjectTwoDList(_key, matKey, mat); aud = GDEDataManager.GetUnityObjectTwoDList(_key, audKey, aud); cus = GDEDataManager.GetCustomTwoDList(_key, cusKey, cus); }
public static List <List <T> > GetCustomTwoDList <T>(string key, List <List <T> > defaultVal) where T : IGDEData, new() { List <List <T> > retVal = defaultVal; try { if (PlayerPrefs.HasKey(key)) { retVal = new List <List <T> >(); List <List <string> > customDataKeys = GDEDataManager.GetStringTwoDList(key, null); if (customDataKeys != null) { foreach (var subListKeys in customDataKeys) { List <T> subList = new List <T>(); foreach (var customDataKey in subListKeys) { T temp; if (GDEDataManager.DataDictionary.TryGetCustom(customDataKey, out temp)) { subList.Add(temp); } } retVal.Add(subList); } } } } catch (Exception ex) { Debug.LogException(ex); } return(retVal); }