MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Feature Request: SceneSystem Service

Open Railboy opened this issue 7 years ago • 2 comments

Describe the problem

Unity suggests using a base manager scene and additively loading / unloading content on top of that. In theory we recommend this approach but in practice our story is muddled.

Describe the solution you'd like

A SceneSystem core service to facilitate scene loading and unloading.

  • Additive scene loading will be as simple as passing a scene name or names to an async method.
  • ‘Single’ scene loading will mimic Unity’s single scene loading – just pass a scene name and all current scenes will be automatically unloaded.
  • You will be able to control which scenes are required to have an MRTK instance and which aren’t.
  • You will be able to open / play multiple scenes (with multiple MRTK instances) in the editor.
  • The service will help you spot and automatically resolve common mismatches between scene settings (lighting, navmeshes, etc.)
  • Like all services, the scene system can be disabled and devs can use Unity’s SceneManager exclusively, if desired.

Describe alternatives you've considered

Updating our docs with detailed guidance and leaving it to devs to implement their own solutions.

Additional context

Initial Proposal: #3987 Related PRs: #4047, #4035, #3890, #3961

Railboy avatar Apr 25 '19 19:04 Railboy

Interesting. Out of curiosity, how would I actually load a second scene today, with MRTK. I've tried using SceneManager.LoadScene but that causes many null pointer errors. See my comments in PR #4035 to illustrate how I tried switching scenes while in Unity play mode, and the errors that I hit.

julenka avatar May 06 '19 06:05 julenka

Right now there's no way to do it that doesn't cause problems. We've been attacking separate issues one-by-one (eg the camera cache fix) and there are still more to go (like the ones you list in your comments). The plan is to fix those issues individually and marge them into mrtk_development before this service is released.

Railboy avatar May 06 '19 18:05 Railboy