protected override void UnregisterCallbacksFromTarget() { target.UnregisterCallback <MouseOverEvent>(OnMouseOver); target.UnregisterCallback <MouseOutEvent>(OnMouseOut); ResetInsertLocation(); m_InsertLocation = null; }
protected override void RegisterCallbacksOnTarget() { if (!(target is VisualElement && target is IInsertLocation)) { throw new InvalidOperationException("Manipulator can only be added to an IInsertLocation VisualElement"); } m_InsertLocation = target as IInsertLocation; target.RegisterCallback <MouseOverEvent>(OnMouseOver); target.RegisterCallback <MouseOutEvent>(OnMouseOut); }