Skip to content

Upgrading the Unity Plugin to a newer version

marc-n-dream edited this page May 13, 2025 · 8 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 Delete the following directories.

  • Assets/AirConsole/examples
  • Assets/AirConsole/scripts
  • Assets/AirConsole/unity-webview

you can alternatively also delete the complete Assets/AirConsole directory from 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

2. For the upgrade process to work correctly, you need to ensure that

  • 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

3. 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" 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.

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.