RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
232 stars 28 forks source link

Exception thrown when building to MacOS xcode project #785

Closed richardzzzarnold2 closed 3 years ago

richardzzzarnold2 commented 3 years ago

Hi I am trying to make a build to MacOS using AVPro 1.11.7 Everything works fine when I do a direct build on MacOS standalone. The exceptions occur when I build an XCode project for Mac Standalone. I get the following exception: DllNotFoundException: AVProVideo

at (wrapper managed-to-native) RenderHeads.Media.AVProVideo_OSXMediaPlayer.AVPPluginRegister()

at RenderHeads.Media.AVProVideo_OSXMediaPlayer.Initialise () [0x0000d] in <32f2f394f8a54acebf57e1d6d27b17eb>:0

at RenderHeads.Media.AVProVideo_OSXMediaPlayer..cctor () [0x00016] in <32f2f394f8a54acebf57e1d6d27b17eb>:0

Rethrow as TypeInitializationException: The type initializer for 'RenderHeads.Media.AVProVideo_OSXMediaPlayer' threw an exception.

at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)

at RenderHeads.Media.AVProVideo.MediaPlayer.CreatePlatformMediaPlayer () [0x00002] in <32f2f394f8a54acebf57e1d6d27b17eb>:0

at RenderHeads.Media.AVProVideo.MediaPlayer.Initialise () [0x00000] in <32f2f394f8a54acebf57e1d6d27b17eb>:0

at RenderHeads.Media.AVProVideo.MediaPlayer.Start () [0x00008] in <32f2f394f8a54acebf57e1d6d27b17eb>:0

Using Unity 2020.2.0a9.1131 AVPro version 1.11.7 using HighSierra 10.13.5

MorrisRH commented 3 years ago

You need to set the Architecture to "Intel 64-bit" in the build settings dialog. There is no support for Apple Silicon in version 1.x so the build process is failing to copy the plugin when trying to make a universal app.

richardzzzarnold2 commented 3 years ago

Such an easy solution! Many thanks

On 17 May 2021, at 10:23, Morris Butler @.***> wrote:

You need to set the Architecture to "Intel 64-bit" in the build settings dialog. There is no support for Apple Silicon in version 1.x so the build process is failing to copy the plugin when trying to make a universal app.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/785#issuecomment-842125512, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATDFUWEPOZWEGXZAD2H4ELLTODHA7ANCNFSM4474IDKQ.

richardzzzarnold2 commented 3 years ago

Hi Morris..

errr.. perhaps I am missing something but I cannot quite see where to set the Architecture to Intel-64 bit in the build settings... Should this be in xcode?

According to the docs architecture is ont available on MacOS

thanks

Richard

You need to set the Architecture to "Intel 64-bit" in the build settings dialog. There is no support for Apple Silicon in version 1.x so the build process is failing to copy the plugin when trying to make a universal app.

MorrisRH commented 3 years ago

It's the Unity build settings dialog, shown here:

Screenshot 2021-05-17 at 11 20 51
richardzzzarnold2 commented 3 years ago

Hi Morris, Can I ask what version of Unity you have there? Dont seem to have that on my 2020.2 Must need an upgrade

On 17 May 2021, at 12:22, Morris Butler @.***> wrote:

It's the Unity build settings dialog, shown here: https://user-images.githubusercontent.com/46530460/118473618-15e3cb80-b702-11eb-966d-2f0350e5899a.png — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/785#issuecomment-842207077, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATDFUWHATWH5QMIACLGOVJTTODU6LANCNFSM4474IDKQ.

MorrisRH commented 3 years ago

I'm using 2020.3 here.

richardzzzarnold2 commented 3 years ago

Updated. Unfortunately the update seems to have wrecked my universal render pipeline or shaders or something. Everythings gone pink.

typical Unity.

On 17 May 2021, at 12:46, Morris Butler @.***> wrote:

I'm using 2020.3 here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/785#issuecomment-842220833, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATDFUWD375HEU4LLGA4RZTTTODXX7ANCNFSM4474IDKQ.

MorrisRH commented 3 years ago

Hmmmm, the option is present in 2020.2.0f1, wonder if it's missing for you as your version was an alpha.

richardzzzarnold2 commented 3 years ago

All working now ! Had to update to 2021 as 2020.3 had some problem with shadergraph Much thanks .

On 17 May 2021, at 13:22, Richard Arnold @.***> wrote:

Updated. Unfortunately the update seems to have wrecked my universal render pipeline or shaders or something. Everythings gone pink.

typical Unity.

On 17 May 2021, at 12:46, Morris Butler @. @.>> wrote:

I'm using 2020.3 here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/785#issuecomment-842220833, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATDFUWD375HEU4LLGA4RZTTTODXX7ANCNFSM4474IDKQ.

richardzzzarnold2 commented 3 years ago

Hi there. I know its a bit above and beyond your remit, but, do you have any experience with bundle signing for the AVProVideo plugin?

I am having a heck of time trying to sign this app for mac store delivery.

I have tried everything under the sun that I have found on the internet, but I am still getting a CFbundlecollision when trying to validate signatures.

Any idea how I can resolve this?

thanks

Richard Arnold

Im using AVProVideo 1x 1.11.7 Unity 2021 XCode 12.4

MorrisRH commented 3 years ago

I would try changing the bundle identifier of the plugin from: com.renderheads.AVProVideoPlugin to: <your bundle identifier>.AVProVideoPlugin in the Info.plist file (AVProVideo.bundle/Contents/Info.plist).

richardzzzarnold2 commented 3 years ago

On 21 May 2021, at 10:42, Morris Butler @.***> wrote:

I would try changing the bundle identifier of the plugin from: com.renderheads.AVProVideoPlugin to:

.AVProVideoPlugin in the Info.plist file (AVProVideo.bundle/Contents/Info.plist). — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or unsubscribe . Ok thanks Morris!

I just got it going by adding a suffix to the bundle identifiers info.plist

com.renderheads.AVProVideoPlugin.123456789

much thanks

Richard Arnold