public PlayerPrefStore(string name, string prefType, string valueTxt) { this.name = name; value = new PrefValue(); initial = new PrefValue(); switch (prefType) { case "integer": value.intValue = initial.intValue = int.Parse(valueTxt); value.type = initial.type = PlayerPrefsEditor.PrefType.Int; break; case "real": value.floatValue = initial.floatValue = float.Parse(valueTxt); value.type = initial.type = PlayerPrefsEditor.PrefType.Float; break; case "string": value.stringValue = initial.stringValue = valueTxt; value.type = initial.type = PlayerPrefsEditor.PrefType.String; break; } }