public override void OnInspectorGUI() { ParryTargetDefinition parry = (ParryTargetDefinition)target; if (centerTransform) { if (GUILayout.Button("Enable Point to Point transforms")) { centerTransform = false; //parry.transform.hideFlags = HideFlags.NotEditable; } } else { if (GUILayout.Button("Enable Center Transform")) { centerTransform = true; //parry.transform.hideFlags = 0; } } base.OnInspectorGUI(); if (!centerTransform) { HandlePoint1 = parry.GetLineStart(); HandlePoint2 = parry.GetLineEnd(); } }
private void OnEnable() { ParryTargetDefinition parry = (ParryTargetDefinition)target; HandlePoint1 = parry.GetLineStart(); HandlePoint2 = parry.GetLineEnd(); //parry.transform.hideFlags = HideFlags.NotEditable; }