-
Notifications
You must be signed in to change notification settings - Fork 19
Upgrading the Unity Plugin to a newer version
With the airconsole-unity-plugin 2.6.0 we introduce new capabilities and Assembly Definitions. Due to that, we needed to update the folder structure and code locations, an operation Unity Packages are not able to automatically take care of.
Assets/AirConsole/examples
Assets/AirConsole/scripts
Assets/AirConsole/unity-webview
you can alternatively also delete the complete Assets/AirConsole
directory from your project.
If you moved Assets/AirConsole
to a different location, ensure it is located at Assets/AirConsole
or complete deleted. Starting with v2.6.0 of the plugin, the tooling expects the AirConsole plugin to be found in Assets/AirConsole
- either the code that depends on AirConsole is temporally disabled (by using an Assembly Definition that is excluded on the current platform for example)
- or import the package
Assets/AirConsole/airconsole-code.unitypackage
manually
Search for a script usage like src="https://www.airconsole.com/api/airconsole-1.8.0.js"
, src="https://www.airconsole.com/api/airconsole-1.9.0.js"
or src="https://www.airconsole.com/api/airconsole-latest.js"
and replace it with src="https://www.airconsole.com/api/airconsole-1.10.0.js"
4. If you do not have any custom additions to the AndroidManifest or gradle files, you can delete Assets/Plugins/Android
. We now ensure that the build gets correctly prepared and configured with the AirConsole requirements for TV and Automotive platforms.
Important note: Unity 2019 is no longer supported. With this, we also remove the Assets/WebGLTemplates/Airconsole
template.
You need to copy the correct version from WebGLTemplates/AirConsole
for Unity 2019 and below or WebGLTemplates/AirConsole-2020
for Unity 2020+ to the WebGLTemplate folder you use.
Open your controller's html file as well as the index.html in your WebGL template and search for <script src="translation.js"></script>
and replace it with <script src="airconsole-settings.js"></script>
, otherwise neither Translations nor Player Silencing will work.
Search for a script usage like <script src="https://www.airconsole.com/api/airconsole-1.8.0.js"></script>
and replace it with <script src="https://www.airconsole.com/api/airconsole-1.9.0.js"></script>
1. Replace AirConsole.instance.devices with AirConsole.instance.Devices
2. Replace AirConsole.instance.device_id with AirConsole.instance.GetDeviceId()
3. Replace AirConsole.instance.server_time_offset with AirConsole.instance.GetServerTime()
The location of the Webview has changed in this release.
When upgrading from v2.11 and before, you need manually remove the old Webview plugin parts:
Assets/AirConsole/plugins/WebViewObject.cs
Assets/AirConsole/plugins/Editor/UnityWebViewPostprocessBuild.cs
Assets/AirConsole/plugins/WebView.bundle
Assets/AirConsole/plugins/WebViewSeparated.bundle
Assets/AirConsole/plugins/Anrdoid/WebViewPlugin.jar
Assets/AirConsole/plugins/iOS/WebView.mm
Assets/AirConsole/plugins/X86_64/WebView.bundle
With v2.11, the AirConsole.instance.OnMute
event was removed and the AirConsole platform stopped invoking it for older projects in July 2023.
When upgrading you need to update your event handlers for AirConsole.instance.OnAdShow
and AirConsole.instance.OnAdComplete
to take care of muting the game.