Skip to content

Upgrading the Unity Plugin to a newer version

marc-n-dream edited this page Aug 20, 2025 · 10 revisions

Upgrading to v2.6.0

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.

1. Before importing the plugin

1.1 Upgrade to Unity 2022 or newer

If you use Unity 2019, 2020 or 2021, you will need to update the project to an actively supported Unity LTS version (Unity 2022.3 or Unity 6+) to use the AirConsole plugin.

Note: With Unity 2019 no longer supported, you can also remove the Assets/WebGLTemplates/Airconsole template if it still is in your project.

1.2 Ensure the AirConsole plugin is in the correct location

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. If it doesn't, the plugin will stop to work.

2. The version of the airconsole api has changed.

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" in your controller and replace it with src="https://www.airconsole.com/api/airconsole-1.10.0.js"

3. AirConsole now uses ASMDEFs

If you use Assembly Definitions for your own code, you will need to reference AirConsole.Runtime as a dependency for your project to compile again.

4. If you do not have any custom additions to the AndroidManifest or gradle files, you can delete Assets/Plugins/Android.

AirConsole now ensures that the build gets correctly prepared and configured with the AirConsole requirements for TV and Automotive platforms independent of the initial state of these files.

Upgrading from v2.14- to v2.5.0

1. The content of airconsole-unity-plugin.js has changed.

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.

2. The content of the index.html / screen.html has changed.

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.

3. The version of the airconsole api has changed.

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>

4. Ensure that obsolete API devices, device_id and server_time_offset are updated:

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()

Upgrading from v2.11 to v2.12+

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

Upgrading from older versions to v2.11+

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.