Unity - In a multiscene setup, is a startup scene a bad alarm on testability?

Question

I Setup a pretty cool multi scene setup in Unity, and things going on pretty well. But then i ask myself, what if i want to test one specific scene of my game without passing from startup (That load all the required systems correctly) ?

I wrap my head around this problem today and i didn't find out a nice solution.

My solution was to create some scripts that works like a promise of the interface of the target system, that are always in scenes and could be replicated. Then this system wrapper check if the system is in the scene, if it's there simply return the reference to the system, if not instanciate it (I use addressable so i put the system on a different scene directly and additive loaded when needed).

I want that my game scene to be testable during development without passing everytime through from startup-> menu -> level -> etc... whatever scene before the scene you want.

You guys use other solution to solve this specific problem?

Thanks in advance

Posted Jan 4, 2023, 6:06 PM UTC · edited

35
Loading comments…