Description
The Files
property of the Editor.DragData
class provides access to all files and folders included in the drag data. This property returns an array of strings, where each string represents the path to a file or folder that is part of the drag-and-drop operation.
Usage
To access the Files
property, you need an instance of the Editor.DragData
class. Once you have the instance, you can retrieve the array of file and folder paths by simply accessing the Files
property.
This property is particularly useful when you need to process or display the files and folders involved in a drag-and-drop event within a tool widget.
Example
// Assuming 'dragData' is an instance of Editor.DragData
string[] files = dragData.Files;
foreach (string file in files)
{
// Process each file or folder path
// For example, log the file path or perform operations on the file
Console.WriteLine(file);
}