macOS Platform
Plugin Specs
- Compatibility
- Unity 2018.x - 2022.x are supported
- macOS Mojave (10.14) and later are supported
- Only 64-bit (x86_64, arm64) builds are supported
- Rendering
- Only the Metal rendering API is supported
- Multi-threaded rendering is supported
- Internals
- Under the hood we’re using Apple's AVFoundation API
- The only 3rd-party libraries used in the macOS binaries are:
- HapInAVFoundation https://github.com/Vidvox/hap-in-avfoundation
Supported Media
See the Supported Media section for more information.
Streaming
See the Streaming section for more information.
Platform-Specific Options
See the Platform-Specific Options section for more information.
Troubleshooting
Rendering
- Lack of video output is usually due to the OpenGLCore renderer being selected. Make sure you're using the Metal renderer and have enabled "Metal Editor Support" in the "Other Settings" section of the macOS Player Settings inspector.
Notarising
- We notarise the plugin bundle so you shouldn't have to code-sign it prior to building your package for submission to the App Store.
Plugin fails to load when using macOS versions older than 10.14.4
Significant portions of AVPro Video are now written using Swift. Unfortunately the Swift 5 standard libraries were not added to macOS until 10.14.4 and when running under older version of macOS you will encounter an error similar to the following:
dyld: Library not loaded: @rpath/libswiftCore.dylib
To be able to use AVPro Video in the Unity editor with older versions of macOS please install the "Swift 5 Runtime Support for Command Line Tools" package available from Apple's developer site here.
If you just want standalone builds to be able to run on older versions of macOS, you need to do the following:
- Make sure you're using Unity 2019 or later
- Make sure the iOS Build Support module is installed
- In the Build Settings dialog, make sure "Create Xcode Project" is checked
- In the Player Settings inspector:
- In the Other Settings section
- Add
AVPROVIDEO_SUPPORT_MACOSX_10_14_3_AND_OLDER
to "Scripting Define Symbols"
- Add
- In the Other Settings section
- Build the project
- Check that "Always Embed Swift Standard Libraries" is set to "YES" in the main target's build settings.
Unfortunately we don't have a solution for projects built with older versions of Unity.
Y'CbCr Video Output Mode
Apple platforms have support for Y'CbCr textures which has lower memory overheads and is slightly more performant when compared with standard BGRA32 textures. This option is disabled by default and can be enabled on the MediaPlayer in at Platform Specific section:
The DisplayIMGUI and DisplayUGUI components automatically detect the use of Y'CbCr mode and switch to a suitable shader. ApplyToMesh/ApplyToMaterial also detect this setting and try to set up the shader on the material to the correct settings, however it requires the shader to have the correct properties. The AVPro Video shaders support this, so if you want to use this on a mesh then make sure you’re using these shaders.