videokit-ai / natcorder

High performance, cross-platform video recording for Unity Engine.
https://github.com/natmlx/videokit
Apache License 2.0
100 stars 19 forks source link

Can't reliably compile for Apple M1 #3

Closed grex closed 2 years ago

grex commented 2 years ago

tldr: What is the correct way to enable M1-compatible builds?

We're using NatCorder in a Desktop Unity project with a NatML Cloud subscription (username grex).

In order to create a working build that will work on Apple M1 Silicon ...

However, the file constantly gets reverted to the x86_64 value and Unity spits out the following warning: The package cache was invalidated and rebuilt because the following immutable asset(s) were unexpectedly altered: Packages/ai.natml.natcorder/Plugins/macOS/NatCorder.bundle

Our modified NatCorder.bundle: https://gist.github.com/grex/61e041103d242629a592a9bb0d11f3ce

Diff: https://www.diffchecker.com/3mEcRjQu

Our NatCorder version is 1.8.4 (also tried 1.8.6 but same problem persists)

olokobayusuf commented 2 years ago

Hey @grex what version of Unity are you using? It seems that Unity changed the plugin importer in Unity 2021, so I was able to confirm this issue. I'll publish an update later today with the fix.

The workaround is to manually import NatCorder into your project:

  1. In manifest, import the ai.natml.hub: 1.0.9 package instead.
  2. Download NatCorder as a .zip from GitHub.
  3. Unzip and place the folder in your Packages/ folder.

Thanks for bringing this to my attention.

grex commented 2 years ago

Thank you! Our Unity Version is 2021.3.0f1

olokobayusuf commented 2 years ago

Fixed in 1.8.7.