diff --git a/Source/Engine/Engine/NativeInterop.cs b/Source/Engine/Engine/NativeInterop.cs index 2c606465c..eab2ba942 100644 --- a/Source/Engine/Engine/NativeInterop.cs +++ b/Source/Engine/Engine/NativeInterop.cs @@ -1679,6 +1679,8 @@ namespace FlaxEngine.Interop /// internal static ManagedHandle GetTypeManagedHandle(Type type) { + if (type.IsInterface && type.IsGenericType) + type = type.GetGenericTypeDefinition(); // Generic type to use type definition handle if (managedTypes.TryGetValue(type, out (TypeHolder typeHolder, ManagedHandle handle) tuple)) return tuple.handle; #if FLAX_EDITOR