Asset Selecter
[AssetSelecter]
attribute automatically showing in dropdown list all available asset type of property type.
Support Types
All asset types.
Parameters
Parameter Name | Description | Default | Arguments |
---|---|---|---|
AssetType |
Search asset type | Type of field | None |
Path |
Search asset path | Assets | None |
SearchOption |
Search asset option | All Directories | None |
Examples
[AssetSelecter]
public PhysicsMaterial value;
[AssetSelecter(AssetType = typeof(Texture2D))]
public Object names;
[AssetSelecter(Path = "Assets/My Materials")]
public Material material;
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
{
[AssetSelecter(AssetType = typeof(Material), Path = "Assets/My Materials")]
public Object value;
}
Live demo