Folder Path
[FolderPath]
attribute allow to select corrent path to the folder via build-in in OS panel.
Support Types
String
Parameters
Parameter Name | Description |
---|---|
Title |
Folder panel title. |
Folder |
Start panel folder. |
DefaultName |
Default folder name. |
RelativePath |
Convert path to project relative. Only if selected folder inside Assets folder. |
Examples
[FolderPath]
public string folderPath;
[FolderPath(Title = "Select Material Folder...")]
public string materialFolder;
[FolderPath(Title = "Select Folder With Texture...", RelativePath = true)]
public string textureFolder;
[FolderPath(RelativePath = true)]
public string sceneFolder;
Note
- Make sure that you have added ApexInspector namespace in your script, to get access to all attributes.
using ApexInspector;
Demo
using ApexInspector;
using UnityEngine;
public class ExampleComponent : MonoBehaviour
{
[FolderPath(RelativePath = true)]
public string folderPath;
}
Live demo