| using UnityEditor; | 
| using System; | 
| using System.IO; | 
|   | 
| [CustomEditor(typeof(SoFoTransmit))] | 
| public class SoFoTransmitEditor : SoFlyObjectEditor | 
| { | 
|     [MenuItem("程序/角色相关/技能配置/飞行物/传递链接")] | 
|     static void CreateSoFoTransmit() | 
|     { | 
|         SoFoTransmit _config = CreateInstance<SoFoTransmit>(); | 
|         string _createName = string.Format(ScriptableObjectLoader.SoFlyObject_Suffix, | 
|                                            DateTime.UtcNow.ToFileTimeUtc()); | 
|         string _path = ResourcesPath.ResourcesOutPath + "refdata/ScriptableObject/SoFlyObject/"; | 
|         if (Directory.Exists(_path) == false) | 
|         { | 
|             Directory.CreateDirectory(_path); | 
|         } | 
|         _path = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath, | 
|                                       "refdata/ScriptableObject/SoFlyObject/", | 
|                                       _createName, | 
|                                       ".asset"); | 
|         AssetDatabase.CreateAsset(_config, _path); | 
|         AssetDatabase.Refresh(); | 
|         ProjectWindowUtil.ShowCreatedAsset(_config); | 
|     } | 
|   | 
|     private void OnEnable() | 
|     { | 
|         SoFoTransmit _target = target as SoFoTransmit; | 
|         _target.type = SoFlyObject.E_FlyObjectType.Transmit; | 
|     } | 
|   | 
|     protected override void OnDrawInspectorGUI() | 
|     { | 
|         base.OnDrawInspectorGUI(); | 
|   | 
|         SoFoTransmit _target = target as SoFoTransmit; | 
|   | 
|         _target.transmitBack = EditorGUILayout.Toggle("是否回传", _target.transmitBack); | 
|         _target.nextStartInterval = EditorGUILayout.FloatField("下一个传递出现间隔", _target.nextStartInterval); | 
|         _target.eachLastTime = EditorGUILayout.FloatField("出现停留时间", _target.eachLastTime); | 
|     } | 
|   | 
| } |