[UTF 1.4] Game View permanently polluted after test runs

In my project, Test Framework was just updated to 1.4.3 (from 1.1.33) as a result of the Collections package being updated to 2.4.1.

In UTF 1.4.3, running Play Mode tests now results in test-related text and button UI being permanently added to the Game View:

This UI doesn’t go away when I change scenes, or when I enter Play Mode. Also, after running tests, the camera no longer works when entering Play Mode. I can see the camera moving around in the Scene View, but the Game View is not rendering what the camera sees. (Presumably, Test Framework is adding various hidden GameObjects to the hierarchy, including a Camera that becomes the new main camera?)

I have to restart Unity to make my Game View work again.

  • I’m running Unity 2022.3.29
  • (Almost) all my tests are Play Mode tests. (And: Edit Mode tests don’t trigger these issues!)
  • I use a mixture of [Test] and [UnityTest]-based tests, some of which load scenes and some of which don’t. This issue occurs in all of them.
  • When I run tests, a progress dialog says “Legacy Play Mode Run”. (I’m not sure what this means - maybe I need to update my test code…?)

9859794--1420254--legacyplaymoderun.png

I looked through the forums and didn’t see other reports of this issue, which is surprising! Am I doing something wrong/weird? Is there some teardown boilerplate I should be adding to my test classes? (None of my test code uses any sort of tear-down or cleanup logic.)

That bug has been fixed in v1.4.4

1 Like

Oh, great! Thanks for the heads up!