using System.Collections.Generic; using Sirenix.OdinInspector; using UnityEditor; using UnityEngine; namespace UnityTest.ZXL { public class Test : SerializedMonoBehaviour { [FolderPath] public string folderPath; public string assetName; [Button] void AA() { string path = $"{folderPath}/{assetName}.asset"; DialogueAsset dialogueAsset = ScriptableObject.CreateInstance(); dialogueAsset.datas = new List(); AssetDatabase.CreateAsset(dialogueAsset, path); } } }