private void OnEnable() { _controllers = null; this.UpdateEditor(); ExtSerializedProperties.SetObjectReferenceValueIfEmpty <ControllerStick>(this.GetPropertie("_controller"), _target.transform); this.ApplyModification(); }
//protected virtual void OnStartDragging(GameObject current) //{ // if (_splineController == null) // { // return; // } // if (current != _splineController.gameObject) // { // return; // } // this.UpdateEditor(); // // _anchorOption = this.GetPropertie("_anchorOnSplineMoved").boolValue; // this.GetPropertie("_anchorOnSplineMoved").boolValue = true; // // // _positionAtStartLerp = _previousDraggingPosition = _splineController.PathPosition; // //SetSticky(false); // this.ApplyModification(); //} //protected virtual void OnEndDragging(GameObject current) //{ // if (_splineController == null) // { // return; // } // if (current != _splineController.gameObject) // { // return; // } // this.UpdateEditor(); // // this.GetPropertie("_anchorOnSplineMoved").boolValue = _anchorOption; // // // //SetSticky(true); // this.ApplyModification(); //} public void ConstructSpline(SplineBase spline) { this.UpdateEditor(); if (spline != null) { ExtSerializedProperties.SetObjectReferenceValueIfEmpty <SplineBase>(this.GetPropertie("_spline"), spline.transform); } ExtSerializedProperties.SetObjectReferenceValueIfEmpty <Transform>(this.GetPropertie("_toMove"), _splineController.transform); this.ApplyModification(); }
public void ConstructSticker(ControllerStick sticker) { this.UpdateEditor(); if (sticker != null) { ExtSerializedProperties.SetObjectReferenceValueIfEmpty <ControllerStick>(this.GetPropertie("_targetStick"), sticker.transform); ExtSerializedProperties.SetObjectReferenceValueIfEmpty <SplineBase>(this.GetPropertie("_spline"), sticker.SplineBase.transform); } ExtSerializedProperties.SetObjectReferenceValueIfEmpty <Transform>(this.GetPropertie("_toMove"), _target.transform); this.ApplyModification(); }
protected virtual void OnEnable() { _waypointList = null; this.UpdateEditor(); ExtSerializedProperties.SetObjectReferenceValueIfEmpty <SplineBase>(this.GetPropertie("_spline"), _target.transform); this.ApplyModification(); _previousPositionUnit = _target.PositionUnits; if (_target.GetComponent <SplineBase>() == null) { Tools.hidden = true; } }
protected virtual void OnEnable() { if (target is ControllerStick) { _splineController = (ControllerStick)target; this.UpdateEditor(); ExtSerializedProperties.SetObjectReferenceValueIfEmpty <SplineBase>(this.GetPropertie("_spline"), _splineController.transform); ExtSerializedProperties.SetObjectReferenceValueIfEmpty <Transform>(this.GetPropertie("_toMove"), _splineController.transform); this.ApplyModification(); } if (_splineController) { _positionUnits = _splineController.PositionUnits; } }
private void OnEnable() { if (Application.isPlaying) { return; } this.UpdateEditor(); ExtSerializedProperties.SetObjectReferenceValueIfEmpty <Transform>(this.GetPropertie("_toMove"), _target.transform); if (_target.TargetStick != null && _target.TargetStick.SplineBase != null) { ExtSerializedProperties.SetObjectReferenceValueIfEmpty <SplineBase>(this.GetPropertie("_spline"), _target.TargetStick.SplineBase.transform); } this.ApplyModification(); }
public void ConstructSplineZone(SplineBase spline) { this.UpdateEditor(); ExtSerializedProperties.SetObjectReferenceValueIfEmpty <SplineBase>(this.GetPropertie("_triangle"), spline.transform); this.ApplyModification(); }
protected virtual void OnEnable() { this.UpdateEditor(); ExtSerializedProperties.SetObjectReferenceValueIfEmpty <PointsOnSplineExtension>(this.GetPropertie("_points"), _target.transform); this.ApplyModification(); }