using UnityEngine;
|
|
#if UNITY_EDITOR
|
using UnityEditor;
|
using System.IO;
|
using System;
|
#endif
|
|
public class SoDeadFly : ScriptableObject
|
{
|
public float hDuration;
|
public AnimationCurve curve;
|
}
|
|
#if UNITY_EDITOR
|
[CustomEditor(typeof(SoDeadFly))]
|
public class SoDeadFlyEditor : Editor
|
{
|
[MenuItem("程序/角色相关/技能配置/新增 死亡击飞配置")]
|
static void CreateSoFoTransmit()
|
{
|
SoDeadFly _config = CreateInstance<SoDeadFly>();
|
string _createName = string.Format(ScriptableObjectLoader.SoDeadFly_Suffix,
|
DateTime.UtcNow.ToFileTimeUtc());
|
string _path = ResourcesPath.ResourcesOutPath + "refdata/ScriptableObject/SoDeadFly/";
|
if (Directory.Exists(_path) == false)
|
{
|
Directory.CreateDirectory(_path);
|
}
|
_path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
|
"refdata/ScriptableObject/SoDeadFly/",
|
_createName,
|
".asset");
|
AssetDatabase.CreateAsset(_config, _path);
|
AssetDatabase.Refresh();
|
ProjectWindowUtil.ShowCreatedAsset(_config);
|
}
|
}
|
#endif
|