Skip to content

Commit

Permalink
Fix calling the ScriptAttributeUtility.GetDrawerTypeForType method in…
Browse files Browse the repository at this point in the history
… Unity 2033.3+
  • Loading branch information
arimger committed Dec 29, 2023
1 parent 3106329 commit f6188a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Assets/Editor Toolbox/Editor/ToolboxDrawerModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,11 @@ internal static void UpdateDrawers(IToolboxInspectorSettings settings)
/// </summary>
internal static bool HasNativeTypeDrawer(Type type)
{
#if UNITY_2023_3_OR_NEWER
var parameters = new object[] { type, null, false };
#else
var parameters = new object[] { type };
#endif
var result = getDrawerTypeForTypeMethod.Invoke(null, parameters) as Type;
return result != null && typeof(PropertyDrawer).IsAssignableFrom(result);
}
Expand Down

0 comments on commit f6188a7

Please # to comment.