public override void OnStart(StartState state) { base.OnStart(state); Fields[nameof(magneticsEnabled)].uiControlFlight.onFieldChanged = delegate(BaseField a, System.Object b) { this.actionWithSymmetry(m => { m.magneticsEnabled = magneticsEnabled; animation.SetScalar(m.magneticsEnabled ? 1 : 0); }); }; }