Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Console being spammed with XRRig warnings #911

Closed
4 of 7 tasks
SimonDarksideJ opened this issue Jan 18, 2022 · 4 comments
Closed
4 of 7 tasks

Console being spammed with XRRig warnings #911

SimonDarksideJ opened this issue Jan 18, 2022 · 4 comments
Labels
Bug Something isn't working

Comments

@SimonDarksideJ
Copy link
Contributor

SimonDarksideJ commented Jan 18, 2022

XRTK - Mixed Reality Toolkit Bug Report

Describe the bug

In both a clean project and in XRTK dev, with a scene using a configured XRCameraRig, the toolkit seems to be constantly trying to recreate the rig and in some cases creates multiple.

This causes the error described below to be spammed in to the console.

To Reproduce

(Only tested on Oculus / Android / Standalone atm)

  1. Clone Development
  2. Open Unity for XRTK-Core project
  3. Create a new Scene
  4. Use -> MixedRealityToolkit -> configure
  5. View MRTK config, especially camera profile
  6. Observe Console.

Expected behavior

No warnings if the scene has not changed

Actual behavior

Spam

Screenshots

The Mixed Reality Toolkit expected the camera's parent to be named XRCameraRig. The existing parent will be renamed and used instead.
UnityEngine.Debug:LogWarning (object)
XRTK.Services.CameraSystem.DefaultCameraRig:get_PlayerCamera () (at Packages/com.xrtk.core/Runtime/Services/CameraSystem/DefaultCameraRig.cs:125)
XRTK.Services.CameraSystem.DefaultCameraRig:get_CameraTransform () (at Packages/com.xrtk.core/Runtime/Services/CameraSystem/DefaultCameraRig.cs:85)
XRTK.Providers.CameraSystem.BaseCameraDataProvider:UpdateCameraHeightOffset (single) (at Packages/com.xrtk.core/Runtime/Providers/CameraSystem/BaseCameraDataProvider.cs:430)
XRTK.Providers.CameraSystem.BaseCameraDataProvider:SetupTrackingOrigin () (at Packages/com.xrtk.core/Runtime/Providers/CameraSystem/BaseCameraDataProvider.cs:333)
XRTK.Providers.CameraSystem.BaseCameraDataProvider:Initialize () (at Packages/com.xrtk.core/Runtime/Providers/CameraSystem/BaseCameraDataProvider.cs:169)
XRTK.Services.MixedRealityToolkit:InitializeAllServices () (at Packages/com.xrtk.core/Runtime/Services/MixedRealityToolkit.cs:1313)
UnityEditor.EditorApplication:Internal_CallDelayFunctions ()

Error 2 caused during build & run

Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)
The following scene GameObjects were found:
Main Camera

UnityEditor.BuildPlayerWindow:BuildPlayerAndRun ()

Your Setup

  • Operation System:
    • Windows
    • MacOs
    • Linux
    • Other
  • Unity Version: 2019.4.19f
  • XRTK Packages
    • com.xrtk.core 0.3.0-preview
    • com.xrtk.sdk 0.3.0-preview
    • com.xrtk.oculus 0.3.0-preview

Additional context

May take some "tweaking" to cause error to occur

@SimonDarksideJ SimonDarksideJ added the Bug Something isn't working label Jan 18, 2022
@SimonDarksideJ
Copy link
Contributor Author

The simple resolution to this is to ensure the rig is not regenerated in the editor unless requested.

The runtime resolution should be fine as is, since it will always be using the rig in the scene

@StephenHodgson
Copy link
Contributor

So you're requesting to change the camera rig generation to a manual step?

@SimonDarksideJ
Copy link
Contributor Author

Thought the referred PR, I actually managed to retain the automatic validation of the Rig so the issue no longer occurs. This simply moves the calls for RIg validation to areas that do not cause issue. Functionality for RIg checking still occurs as normal.

Tested

  • New Scene - Add GO - Add Toolkit and set profile
  • New scene - Use Toolkit -> Configure
  • Delete rig, touch Toolkit configuration.
  • Run project

All as before validate the Rig and ensure it is setup as the Camera Config dictates

@StephenHodgson
Copy link
Contributor

I noticed that a lot of other tools forego the automatic validation altogether, is this something we should also consider?

Only validate when someone "Configures..." or manually selects "Setup Camera Rig..."

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants