diff --git a/Assets/AirConsole/ProjectCodeUpdater.cs b/Assets/AirConsole/ProjectCodeUpdater.cs index eece6833..082bde0b 100644 --- a/Assets/AirConsole/ProjectCodeUpdater.cs +++ b/Assets/AirConsole/ProjectCodeUpdater.cs @@ -79,6 +79,13 @@ private static void ExecuteCodePackageImport() { AssetDatabase.DeleteAsset("Assets/AirConsole/unity-webview"); } + // Up to 2.6.3, the code package also installed the plugin tests. They compile against internal plugin members, and + // ImportPackage never deletes files, so a stale copy would break compilation after a later release changes those members. + if (File.Exists(Path.Combine(Application.dataPath, "AirConsole", "scripts", "Tests", "EditMode", + "AirConsole.EditMode.Tests.asmdef"))) { + AssetDatabase.DeleteAsset("Assets/AirConsole/scripts/Tests"); + } + ClearConsole(); SessionState.SetBool(IMPORT_PENDING_KEY, true); #if UNITY_6000_6_OR_NEWER diff --git a/Assets/Packager/Editor/Packager.cs b/Assets/Packager/Editor/Packager.cs index 83022fb2..b5e6805c 100644 --- a/Assets/Packager/Editor/Packager.cs +++ b/Assets/Packager/Editor/Packager.cs @@ -148,17 +148,23 @@ private static void CollectWebGlTemplateFiles(string path, ref IEnumerable it != "Tests") + .Select(it => $"Assets/AirConsole/scripts/{it}") + .Append("Assets/AirConsole/unity-webview") + .Append("Assets/AirConsole/examples") + .ToArray(); + #if UNITY_6000_6_OR_NEWER UnityEditor.AssetPackage.Package.Export(new UnityEditor.AssetPackage.ExportPackageParameters( - new[] { "Assets/AirConsole/scripts", "Assets/AirConsole/unity-webview", "Assets/AirConsole/examples" }, + codePaths, unityPackagePath, "", ExportPackageOptions.Recurse)); #else - AssetDatabase.ExportPackage( - new[] { "Assets/AirConsole/scripts", "Assets/AirConsole/unity-webview", "Assets/AirConsole/examples" }, - unityPackagePath, - ExportPackageOptions.Recurse); + AssetDatabase.ExportPackage(codePaths, unityPackagePath, ExportPackageOptions.Recurse); #endif return unityPackagePath.Replace(Application.dataPath, "Assets"); } diff --git a/CHANGELOG.md b/CHANGELOG.md index b1e80767..2ee1a829 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ Release notes follow the [keep a changelog](https://keepachangelog.com/en/1.1.0/ - **Unity API:** `RequestPhotonEngineAuth` and the `OnPhotonEngineAuth` event provide a ticket for Photon Custom Authentication. Requires airconsole-api 1.12.0. +### Changed + +- **Package:** The plugin package no longer contains the plugin tests (`Assets/AirConsole/scripts/Tests`), so they do not run in game projects. The upgrade deletes `Assets/AirConsole/scripts/Tests` that an earlier version installed. + ## [2.6.3] - 2026-10-03 ### Fixed