public T Reader <T>(string tag, T defaultData) { StoredataType expectedValue = StoredataTypeMgr.GetStoredataType(typeof(T)); Setting.curObject = typeof(T); return(Reader <T>(expectedValue, defaultData)); }
private T Reader <T>(StoredataType type, T defaultData) { if (type != null) { return((T)type.Reader(this, defaultData)); } return(default(T)); }
public void Write <T>(T param, string tag) { StoredataType valueType = StoredataTypeMgr.GetStoredataType(param.GetType()); if (valueType == null) { Debug.LogError("SaveType " + param.GetType().ToString() + "."); } else { valueType.Write(param, this); } }
public static void AddSaveType(StoredataType type) { types[type.type] = type; }