Version: 2022.3
언어: 한국어
public static DragAndDropVisualMode visualMode ;

설명

The visual indication of the drag.

using UnityEngine;
using UnityEditor;

public class Example : MonoBehaviour { void OnGUI() { EventType eventType = Event.current.type; if (eventType == EventType.DragUpdated || eventType == EventType.DragPerform) { // Show a copy icon on the drag DragAndDrop.visualMode = DragAndDropVisualMode.Copy;

if (eventType == EventType.DragPerform) { DragAndDrop.AcceptDrag(); } Event.current.Use(); } } }