Toggling "Enable PlayMode Tests for All Assemblies" From Command Line?

Hello,

My current understanding is that in order to use PlayMode tests, your AppCode needs to be able to be built into a separate assembly (that the PlayMode Test Assembly can then reference) and it cannot reference the Assembly-CSharp.dll?

Our current app is quite big and trying to move to a custom-defined assembly solution would require restructuring of our current codebase, so I was hoping that there might be an easier way to do this.

I’m able to get PlayMode tests running if I check the “Enable PlayMode Tests for All Assemblies” setting in the Test Runner, and I was wondering if it would be possible to toggle this from the command line?

  • The thought then would be to toggle this off when running a production build (along with #if blocks around our playmode test code)
  • And then run a separate build with the toggle on that would run include the PlayMode assemblies and run the PlayMode tests

Thanks for any Help!

Any update on how you went about this?