Hi, all! I need your help!)
This is my simple script:
[CreateAssetMenu(fileName = "TestAsset", menuName = "TestAsset")]
public class Test : ScriptableObject { }
And these images demonstrates what I do:
Hi, all! I need your help!)
This is my simple script:
[CreateAssetMenu(fileName = "TestAsset", menuName = "TestAsset")]
public class Test : ScriptableObject { }
And these images demonstrates what I do:
I solved this problem. This is my solution:
[CreateAssetMenu(fileName = "TestAsset", menuName = "TestAsset")]
public class Test : ScriptableObject
{
public Type field;
#if UNITY_EDITOR
private Type m_FieldReset;
protected virtual void Reset()
{
name = System.IO.Path.GetFileNameWithoutExtension(UnityEditor.AssetDatabase.GetAssetPath(GetInstanceID()));
field = m_FieldReset;
}
protected virtual void OnValidate()
{
m_FieldReset = field;
}
#endif
}