diff --git a/Runtime/StructType/GowSoftRef.cs b/Runtime/StructType/GowSoftRef.cs index 975d786..dcd11e9 100644 --- a/Runtime/StructType/GowSoftRef.cs +++ b/Runtime/StructType/GowSoftRef.cs @@ -3,7 +3,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +#if ODIN_INSPECTOR using Sirenix.OdinInspector; +#endif using UnityEngine; using XericLibrary.Runtime.MacroLibrary; using Object = UnityEngine.Object; @@ -26,15 +28,19 @@ namespace XericLibrary.Runtime.Type.Base /// /// 对象 /// +#if ODIN_INSPECTOR [HorizontalGroup("SoftRef")] [HideLabel] +#endif public GameObject targetObejct; /// /// 路径 /// +#if ODIN_INSPECTOR [HorizontalGroup("SoftRef")] [HideLabel] +#endif public string targetPath; /// diff --git a/Runtime/UI/MacroUI.cs b/Runtime/UI/MacroUI.cs index cf0ff62..47fcce0 100644 --- a/Runtime/UI/MacroUI.cs +++ b/Runtime/UI/MacroUI.cs @@ -8,12 +8,17 @@ using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; using XericLibrary.Runtime.CustomEditor; -using Object = UnityEngine.Object; + +#if ODIN_INSPECTOR using Sirenix.OdinInspector; -#if UNITY_EDITOR +#endif + +#if UNITY_EDITOR && ODIN_INSPECTOR using Sirenix.Utilities.Editor; #endif +using Object = UnityEngine.Object; + namespace XericLibrary.Runtime.MacroLibrary { /// @@ -133,10 +138,13 @@ namespace XericLibrary.Runtime.MacroLibrary #endregion #region 字段属性 - - [LabelText("单选组")] public ToggleGroup ToggleGroup; - +#if ODIN_INSPECTOR + [LabelText("单选组")] +#endif + public ToggleGroup ToggleGroup; +#if ODIN_INSPECTOR [SerializeField, LabelText("编辑单选项目顺序")] [ListDrawerSettings(OnTitleBarGUI = "GetAndSortToggle")] +#endif private List toggleList = new List(); // 当前选中的项目 @@ -162,7 +170,7 @@ namespace XericLibrary.Runtime.MacroLibrary /// public void GetAndSortToggle() { -#if UNITY_EDITOR +#if UNITY_EDITOR && ODIN_INSPECTOR // 自动获取并排序 if (SirenixEditorGUI.ToolbarButton(EditorIcons.Refresh)) {