少年修仙传客户端基础资源
dabaoji
2023-11-13 0a23e1b83f8fda8ab9f9e32fe71c26c431faf63a
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
using UnityEditor;
using System;
using System.IO;
 
public class SoSkillEditor : Editor {
 
    [MenuItem("程序/角色相关/技能配置/SoSkill")]
    static void CreateSoActor() {
        SoSkill _soActor = CreateInstance<SoSkill>();
        string _createName = string.Format(ScriptableObjectLoader.SoSkill_Suffix,
                                           DateTime.UtcNow.ToFileTimeUtc());
        string _path = ResourcesPath.ResourcesOutPath + "refdata/ScriptableObject/SoSkill/";
        if (Directory.Exists(_path) == false) {
            Directory.CreateDirectory(_path);
        }
        _path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
                                      "refdata/ScriptableObject/SoSkill/",
                                      _createName,
                                      ".asset");
        AssetDatabase.CreateAsset(_soActor, _path);
        AssetDatabase.Refresh();
        ProjectWindowUtil.ShowCreatedAsset(_soActor);
    }
 
}