microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

If no tagged "Main Camera", the MRTK -> Configure fails badly #3021

Closed SimonDarksideJ closed 5 years ago

SimonDarksideJ commented 5 years ago

Does this affect the legacy HoloToolkit (master) or the Mixed Reality Toolkit (mrtk_release)?

Mixed Reality Toolkit

Describe the bug

If a scene does not have a main camera tagged as "Main Camera", the Mixed Reality Toolkit -> Configure command fails badly with script errors. image

The script should fall back to find a camera named "Main Camera" and if that fails it should output warning to the console.

To Reproduce

1: create a brand new Unity project 2: Import the MRTK 3: Click Mixed Reality Toolkit -> Configure

(Yup, you guessed it, the default "sample scene" in a new unity project does not have its camera tagged as "Main Camera"

Expected behavior

The scene should be configured correctly. if there is no object tagged "Main Camera" it should look for an object named "Main Camera" If still no camera is found, it should fail nicely with a warning

Actual behavior

Script fails with console warnings about the playspace

Unity Editor Version

2018.2.13f1

Mixed Reality Toolkit Release Version

Stabilization

StephenHodgson commented 5 years ago

I'll work on this asap.