public void UpdateValueToDefault() { object value = PropertyChange.GetValue(selectedComponent, selectedProperty, selectedSubProperty); if (value.GetType() == typeof(float)) { PropertyChange.SetValue(selectedComponent, selectedProperty, actionValue.GetFloat(), selectedSubProperty); } if (value.GetType() == typeof(int)) { PropertyChange.SetValue(selectedComponent, selectedProperty, actionValue.GetInt(), selectedSubProperty); } if (value.GetType() == typeof(Color)) { PropertyChange.SetValue(selectedComponent, selectedProperty, actionValue.GetColor(), selectedSubProperty); } if (value.GetType() == typeof(Vector2)) { PropertyChange.SetValue(selectedComponent, selectedProperty, actionValue.GetVector2(), selectedSubProperty); } if (value.GetType() == typeof(Vector3)) { PropertyChange.SetValue(selectedComponent, selectedProperty, actionValue.GetVector3(), selectedSubProperty); } if (value.GetType() == typeof(string)) { PropertyChange.SetValue(selectedComponent, selectedProperty, actionValue.GetString(), selectedSubProperty); } }
public void UpdateValue(object value) { PropertyChange.SetValue(selectedComponent, selectedProperty, value, selectedSubProperty); }