UnityEditor.ObjectNames.GetDragAndDropTitle C# (CSharp) Method

GetDragAndDropTitle() private method

private GetDragAndDropTitle ( Object obj ) : string
obj Object
return string
        public static extern string GetDragAndDropTitle(Object obj);
        /// <summary>

Usage Example

示例#1
0
        internal static bool HandleDelayedDrag(Rect position, int id, Object objectToDrag)
        {
            Event current = Event.current;

            switch (current.GetTypeForControl(id))
            {
            case EventType.MouseDown:
                if (position.Contains(current.mousePosition) && current.clickCount == 1 && current.button == 0 && (Application.platform != RuntimePlatform.OSXEditor || !current.control))
                {
                    GUIUtility.hotControl = id;
                    ((DragAndDropDelay)GUIUtility.GetStateObject(typeof(DragAndDropDelay), id)).mouseDownPosition = current.mousePosition;
                    return(true);
                }
                break;

            case EventType.MouseDrag:
                if (GUIUtility.hotControl == id && ((DragAndDropDelay)GUIUtility.GetStateObject(typeof(DragAndDropDelay), id)).CanStartDrag())
                {
                    GUIUtility.hotControl = 0;
                    DragAndDrop.PrepareStartDrag();
                    DragAndDrop.objectReferences = new Object[1] {
                        objectToDrag
                    };
                    DragAndDrop.StartDrag(ObjectNames.GetDragAndDropTitle(objectToDrag));
                    return(true);
                }
                break;
            }
            return(false);
        }
All Usage Examples Of UnityEditor.ObjectNames::GetDragAndDropTitle