XRTK / com.xrtk.core

The Official Mixed Reality Framework for Unity
https://xrtk.io
MIT License
309 stars 34 forks source link

MixedRealityPlayspace->Main Camera does not have an audio listener #163

Closed FejZa closed 5 years ago

FejZa commented 5 years ago

XRTK - Mixed Reality Toolkit Bug Report

Describe the bug

If there is no Camera already existing in the scene and the Toolkit is not configured in the scene a modal asks whether to configure it. It will create the MixedRealityToolkit GO and the MixedRealityPlayspace GO with a camera inside. The camera GO does not have an audio listener.

People are used to have an audio listener on the main camera since it must exist only once in the scene and camera is usually the place where it lives.

To Reproduce

  1. Create empty scene
  2. Anwer yes when asked to configure XRTK or use the menu
  3. Press play
  4. Inspect warning -> There is no audio listener in the scene

Expected behavior

If an audio listener does not exist yet in the scene, the toolkit adds it to the main camera created.

Actual behavior

There is no audio listener attached.

Your Setup (please complete the following information)

Target Platform (please complete the following information)

StephenHodgson commented 5 years ago

Should be a pretty simple fix, by adding the audio listener component when creating a new camera in CameraCache

FejZa commented 5 years ago

Agree. I'll take are of this.