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
|