File tree Expand file tree Collapse file tree
Assets/Editor Toolbox/Editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -261,7 +261,11 @@ internal static void UpdateDrawers(IToolboxInspectorSettings settings)
261261 /// </summary>
262262 internal static bool HasNativeTypeDrawer ( Type type )
263263 {
264+ #if UNITY_2023_3_OR_NEWER
265+ var parameters = new object [ ] { type , null , false } ;
266+ #else
264267 var parameters = new object [ ] { type } ;
268+ #endif
265269 var result = getDrawerTypeForTypeMethod . Invoke ( null , parameters ) as Type ;
266270 return result != null && typeof ( PropertyDrawer ) . IsAssignableFrom ( result ) ;
267271 }
Original file line number Diff line number Diff line change 22using System . Linq ;
33
44using UnityEditor ;
5+ using UnityEditor . Build ;
56
67namespace Toolbox . Editor
78{
89 public static class ScriptingUtility
910 {
1011 public static List < string > GetDefines ( )
1112 {
13+ #if UNITY_2023_1_OR_NEWER
14+ var target = NamedBuildTarget . FromBuildTargetGroup ( EditorUserBuildSettings . selectedBuildTargetGroup ) ;
15+ var defines = PlayerSettings . GetScriptingDefineSymbols ( target ) ;
16+ #else
1217 var defines = PlayerSettings . GetScriptingDefineSymbolsForGroup ( EditorUserBuildSettings . selectedBuildTargetGroup ) ;
18+ #endif
1319 return defines . Split ( ';' ) . ToList ( ) ;
1420 }
1521
1622 public static void SetDefines ( List < string > definesList )
1723 {
1824 var defines = string . Join ( ";" , definesList . ToArray ( ) ) ;
25+ #if UNITY_2023_1_OR_NEWER
26+ var target = NamedBuildTarget . FromBuildTargetGroup ( EditorUserBuildSettings . selectedBuildTargetGroup ) ;
27+ PlayerSettings . SetScriptingDefineSymbols ( target , defines ) ;
28+ #else
1929 PlayerSettings . SetScriptingDefineSymbolsForGroup ( EditorUserBuildSettings . selectedBuildTargetGroup , defines ) ;
30+ #endif
2031 }
2132
2233 public static void AppendDefine ( string define )
You can’t perform that action at this time.
0 commit comments