private void Awake() { string type = typeof(T).ToString(); // Allows data to be kept over multiple sessions. m_ResultSize = new Vector2Int(PlayerPrefs.GetInt(type + "_RESULTSIZE_X", 512), PlayerPrefs.GetInt(type + "_RESULTSIZE_Y", 512)); string[] boxes = PlayerPrefsUtil.GetStringArray(type + "_BOXKEYS", string.Empty); foreach (string box in boxes) { string texturePath = PlayerPrefs.GetString(type + "_TEXPATH_" + box, string.Empty); Texture2D texture = null; if (texturePath != string.Empty) { Texture2D pathResult = AssetDatabase.LoadAssetAtPath <Texture2D>(texturePath); if (pathResult != null) { texture = pathResult; } } TextureColorContainer container = new TextureColorContainer( PlayerPrefsUtil.GetBool(type + "_ISCOLOR_" + box, false), texture, PlayerPrefsUtil.GetColor(type + "_COLOR_" + box, Color.black)); m_ComponentBoxes.Add(box, container); } SetSaveableValues(PlayerPrefsUtil.GetFloatArray(type + "_SAVEABLES")); }