mirror of
https://github.com/AnnulusGames/Alchemy.git
synced 2025-01-22 00:08:53 -05:00
Merge pull request #89 from ArkTarusov/fix/unity-2022-compatibility
Fix: Resolved InternalAPIHelper error in Unity 2022.3.23f1 and later
This commit is contained in:
commit
e395eecc7a
@ -39,6 +39,14 @@ namespace Alchemy.Editor
|
||||
{
|
||||
return (Type)methodInfo.Invoke(instance, new object[] { classType });
|
||||
}
|
||||
#elif UNITY_2022_3_OR_NEWER
|
||||
// Unity 2022.3.23f1 added a new parameter to the method
|
||||
var version = UnityEditorInternal.InternalEditorUtility.GetUnityVersion();
|
||||
if (version.Build >= 23)
|
||||
{
|
||||
return (Type)methodInfo?.Invoke(instance, new object[] { classType, isManagedReferenceProperty });
|
||||
}
|
||||
return (Type)methodInfo?.Invoke(instance, new object[] { classType });
|
||||
#else
|
||||
_ = isManagedReferenceProperty; // discard
|
||||
return (Type)methodInfo.Invoke(instance, new object[] { classType });
|
||||
|
Loading…
Reference in New Issue
Block a user