更多兼容性编译选项
This commit is contained in:
@@ -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
|
||||
/// <summary>
|
||||
/// 对象
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[HorizontalGroup("SoftRef")]
|
||||
[HideLabel]
|
||||
#endif
|
||||
public GameObject targetObejct;
|
||||
|
||||
/// <summary>
|
||||
/// 路径
|
||||
/// </summary>
|
||||
#if ODIN_INSPECTOR
|
||||
[HorizontalGroup("SoftRef")]
|
||||
[HideLabel]
|
||||
#endif
|
||||
public string targetPath;
|
||||
|
||||
/// <summary>
|
||||
|
||||
+14
-6
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
@@ -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<Toggle> toggleList = new List<Toggle>();
|
||||
|
||||
// 当前选中的项目
|
||||
@@ -162,7 +170,7 @@ namespace XericLibrary.Runtime.MacroLibrary
|
||||
/// </summary>
|
||||
public void GetAndSortToggle()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
#if UNITY_EDITOR && ODIN_INSPECTOR
|
||||
// 自动获取并排序
|
||||
if (SirenixEditorGUI.ToolbarButton(EditorIcons.Refresh))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user