From 6cf68cd7dc30239195006f2344f24ab4a3146a0b Mon Sep 17 00:00:00 2001 From: Arch <3664080+Baccanno@users.noreply.github.com> Date: Tue, 14 Sep 2021 16:10:50 +0200 Subject: [PATCH] Also keep any Addressable Resource manager As this is a Unity Package I think it should be added here (although in the long run there should be a way to specify additional files to keep depending on packages/own services). I pulled my hair out on this one. My tests where basically just hanging in the void because async operations where not finishing anymore due to this GO suppression. --- .../OptionalExtras/TestFramework/ZenjectTestUtil.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/UnityProject/Assets/Plugins/Zenject/OptionalExtras/TestFramework/ZenjectTestUtil.cs b/UnityProject/Assets/Plugins/Zenject/OptionalExtras/TestFramework/ZenjectTestUtil.cs index f65a51b05..77ca6ebb2 100644 --- a/UnityProject/Assets/Plugins/Zenject/OptionalExtras/TestFramework/ZenjectTestUtil.cs +++ b/UnityProject/Assets/Plugins/Zenject/OptionalExtras/TestFramework/ZenjectTestUtil.cs @@ -7,6 +7,11 @@ namespace Zenject.Internal public static class ZenjectTestUtil { public const string UnitTestRunnerGameObjectName = "Code-based tests runner"; + /// + /// Addressable resource manager + /// + public const string ResourceManagerCallbacks = "ResourceManagerCallbacks"; + public static void DestroyEverythingExceptTestRunner(bool immediate) { @@ -31,7 +36,8 @@ public static void DestroyEverythingExceptTestRunner(bool immediate) foreach (var rootObj in dontDestroyOnLoadRoots) { - if (rootObj.name != UnitTestRunnerGameObjectName) + if (rootObj.name != UnitTestRunnerGameObjectName && + rootObj.name != ResourceManagerCallbacks) { if (immediate) {