-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathAssetPathExample01.cs
28 lines (26 loc) · 1.05 KB
/
AssetPathExample01.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using UnityEngine;
namespace UnityForge.PropertyDrawers
{
public class AssetPathExample01 : MonoBehaviour
{
#pragma warning disable 0649
[Header("Fields without path preview")]
[SerializeField, AssetPath(typeof(Sprite), false)]
private string spriteProjectPath01;
[SerializeField, AssetPath(typeof(Sprite), true)]
private string spriteResourcesPath01;
[Header("Fields with path preview")]
[SerializeField, AssetPath(typeof(Sprite), false, true)]
private string spriteProjectPath02;
[SerializeField, AssetPath(typeof(Sprite), true, true)]
private string spriteResourcesPath02;
#pragma warning restore 0649
private void Awake()
{
Debug.LogFormat("spriteProjectPath01 {0}", spriteProjectPath01);
Debug.LogFormat("spriteResourcesPath01 {0}", spriteResourcesPath01);
Debug.LogFormat("spriteProjectPath02 {0}", spriteProjectPath02);
Debug.LogFormat("spriteResourcesPath02 {0}", spriteResourcesPath02);
}
}
}