Fix compilation for bindings only without scripting internal host defined

This commit is contained in:
Wojtek Figat
2025-10-29 22:18:01 +01:00
parent d24bd7dfd0
commit 053e52c91f

View File

@@ -425,6 +425,8 @@ namespace FlaxEngine.Interop
var fieldOffsetPtr = (IntPtr*)field.FieldHandle.Value; // Pointer to MonoClassField
fieldOffsetPtr += 3; // Skip three pointers (type, name, parent_and_flags)
return *(int*)fieldOffsetPtr - IntPtr.Size * 2; // Load the value of a pointer (4 bytes, int32), then subtracting 16 bytes from it (2 pointers for vtable and threadsync)
#else
throw new NotImplementedException();
#endif
}