public static void ClearAll() { lt = GetClickedObject.LastClickedObject.GetComponent <LeanTranslate>(); ls = GetClickedObject.LastClickedObject.GetComponent <LeanScale>(); lr = GetClickedObject.LastClickedObject.GetComponent <LeanRotateCustomAxis>(); if (lt != null) { Destroy(lt); } if (ls != null) { Destroy(ls); } if (lr != null) { Destroy(lr); } }
public void RotateClick() { ClearAll(); lr = GetClickedObject.LastClickedObject.AddComponent <LeanRotateCustomAxis>(); lr.IgnoreStartedOverGui = false; }