RenderHeads / UnityPlugin-AVProMovieCapture

AVPro Movie Capture is a Unity Plugin for advanced video capture to AVI/MP4/MOV files
https://renderheads.com/products/avpro-movie-capture/
48 stars 8 forks source link

Compilation error for WebGL target. #415

Closed MarcoZVincenzi closed 1 week ago

MarcoZVincenzi commented 1 month ago

Describe the issue AVPro 5.3.0 fails to compile when building for WebGL.

Your Setup (please complete the following information):

To Reproduce

  1. Switch build target to WebGL.
  2. Press Build.

Logs

Assets\Plugins\RenderHeads\AVProMovieCapture\Runtime\Scripts\Internal\Utils.cs(396,24): error CS0117: 'NativePlugin' does not contain a definition for 'GetFreeSpaceInBytesForPath'


We've circumvented the issue by adding a #if !UNITY_WEBGL define around the Utils.DriveFreeBytes(string, out ulong) method, as well as the if (_minimumDiskSpaceMB > 0 [...]) clause, which is part of the CaptureBase.PrepareCapture() method. If I'm not mistaken, these two were inside of a STANDALONE_WIN define in previous versions, meaning they'll never get called on a WebGL build.

The issue was not present in 5.2.0. We are aware WebGL is not really supported, but we'd expect to at least be able to build for it.

Chris-RH commented 1 month ago

Hi,

We've never supported webgl in AVPro Movie Capture. Its not something that has been requested by many people, and we have found too many issues with browser compatibility to be able to easily support it.

MarcoZVincenzi commented 1 month ago

Hi, thanks for the reply. We are aware WebGL is not supported, and that is not what we are requesting. Up until version 5.2.0, the same project was able to be compiled for all target platforms, with the WebGL build simply ignoring the AVPro Movie Capture module. That is no longer the case in 5.3.0 due to the refactoring having moved preprocessor defines around.

Chris-RH commented 1 month ago

AFAIK there haven't been any changes to the Windows side of things. The dev team is on annual leave at the moment, so we'll have to wait until they are back before we can work out what change has caused this.

chris-crucible commented 1 month ago

Confirming same issue here. We build for both WebGL and MacOS. We don't use MovieCapture on the web build, but still need to build for that platform, which has worked until this change.

Also confirming the suggested workaround seems to work for now. Thanks @MarcoZVincenzi.

MorrisRH commented 2 weeks ago

This has been fixed and will make it into the next release.

Chris-RH commented 1 week ago

This has been fixed in AVPro Movie Capture version 5.3.1. Please let us know if your issue is not resolved.