UnityEditor.AvatarPreview.HandleMouseDrag C# (CSharp) Méthode

HandleMouseDrag() protected méthode

protected HandleMouseDrag ( Event evt, int id, Rect previewRect ) : void
evt UnityEngine.Event
id int
previewRect UnityEngine.Rect
Résultat void
        protected void HandleMouseDrag(Event evt, int id, Rect previewRect)
        {
            if ((this.m_PreviewInstance != null) && (GUIUtility.hotControl == id))
            {
                switch (this.m_ViewTool)
                {
                    case ViewTool.Pan:
                        this.DoAvatarPreviewPan(evt);
                        return;

                    case ViewTool.Zoom:
                        this.DoAvatarPreviewZoom(evt, -HandleUtility.niceMouseDeltaZoom * (!evt.shift ? 0.5f : 2f));
                        return;

                    case ViewTool.Orbit:
                        this.DoAvatarPreviewOrbit(evt, previewRect);
                        return;
                }
                Debug.Log("Enum value not handled");
            }
        }