Skip to content

Commit f6188a7

Browse files
committed
Fix calling the ScriptAttributeUtility.GetDrawerTypeForType method in Unity 2033.3+
1 parent 3106329 commit f6188a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Assets/Editor Toolbox/Editor/ToolboxDrawerModule.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)