public void CopyFrom(ScriptableGeneralData otherData) { foreach (FieldInfo field in GetType().GetFields()) { field.SetValue(this, field.GetValue(otherData)); } }
void Awake() { if (Data == null) { Data = generalData; } Params = gameData; }