少年修仙传客户端代码仓库
hch
2025-03-03 28785d6ddf9c08e49527ede9405c7b6c93c6ed32
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
29
30
31
32
33
34
35
36
37
38
39
40
41
using UnityEngine;
 
#if UNITY_EDITOR
using UnityEditor;
#endif
 
public class EarlyStageFirstWaveRock : ScriptableObject
{
    [SerializeField]
    public SingleRockData[] data;
 
    [System.Serializable]
    public class SingleRockData
    {
        public int npcID;
        public Vector3 position;
        public Vector3 eularAngle;
    }
}
#if UNITY_EDITOR
[CustomEditor(typeof(EarlyStageFirstWaveRock))]
public class EarlyStageFirstWaveRockEditor : Editor
{
    [MenuItem("程序/前期战斗第一波怪")]
    static void CreateEarlyStageFirstWaveRock()
    {
        string _path = "Assets/Resources/ScriptableObject/Config/EarlyStageFirstWaveRock.asset";
        EarlyStageFirstWaveRock _data = AssetDatabase.LoadAssetAtPath<EarlyStageFirstWaveRock>(_path);
        if (_data)
        {
            Selection.activeObject = _data;
            return;
        }
        _data = CreateInstance<EarlyStageFirstWaveRock>();
        AssetDatabase.CreateAsset(_data, _path);
        AssetDatabase.Refresh();
        AssetDatabase.SaveAssets();
        ProjectWindowUtil.ShowCreatedAsset(_data);
    }
}
#endif