Wanzyee Studio

UnityEngine.PropertyAttribute to set the file path by Drag'n'Drop or a selecting panel. More...

Inherits PropertyAttribute.

Public Member Functions

 FilePathAttribute ()
 Make a button after the text field to select file path. More...
 
 FilePathAttribute (string extension, bool open=false)
 Make a button after the text field to select file path with default extension. More...
 
 FilePathAttribute (bool folder, bool open=false)
 Make a button after the text field to select file or folder path. More...
 

Public Attributes

readonly bool open
 The flag if to use opening or saving panel. More...
 
readonly bool folder
 The flag if it's a folder or a file path. More...
 
readonly string extension
 The default extension for file path only. More...
 

Detailed Description

UnityEngine.PropertyAttribute to set the file path by Drag'n'Drop or a selecting panel.

Show a context menu by clicking the button after the text field. The menu's used to select or open the file path, or switch between relative and absolute path. This's only for convenience without validating the path or file.

3

Constructor & Destructor Documentation

Make a button after the text field to select file path.

Returns
The instance.
FilePathAttribute ( string  extension,
bool  open = false 
)

Make a button after the text field to select file path with default extension.

Parameters
extensionExtension.
openOpen.
Returns
The instance.
FilePathAttribute ( bool  folder,
bool  open = false 
)

Make a button after the text field to select file or folder path.

Parameters
folderIf it's a folder.
openOpen.
Returns
The instance.

Member Data Documentation

readonly bool open

The flag if to use opening or saving panel.

readonly bool folder

The flag if it's a folder or a file path.

readonly string extension

The default extension for file path only.