AirConsole / airconsole-unity-plugin

A plugin for Unity to develop for AirConsole
http://developers.airconsole.com/#/guides/unity
GNU Lesser General Public License v3.0
69 stars 19 forks source link

Build for Unity WebGL fails due to compile errors in WebViewObject in Unity 2022 #49

Closed dreamora closed 10 months ago

dreamora commented 10 months ago

When trying to build for Unity WebGL in 2022 I receive several errors like:

Assets/AirConsole/unity-webview/Runtime/WebViewObject.cs(592,17): error CS0161: 'WebViewObject.CanGoForward()': not all code paths return a value

in methods that have return values.

I found that by replacing

#if UNITY_WEBPLAYER

with

 #if UNITY_WEBPLAYER || UNITY_WEBGL

I can address the problem

marc-n-dream commented 10 months ago

The issue is addressed in the new version of our custom unity webview plugin. For anyone experiecing the issue that needs to address it immediately, please use the new version of WebViewObject.cs at https://github.com/AirConsole/airconsole-unity-webview/blob/stable/package/Runtime/WebViewObject.cs

The next version of AirConsole Unity Plugin will address this.

marc-n-dream commented 10 months ago

The issue has been addressed in the just released hotfix v2.13