XRTK / com.xrtk.core

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

Create new IMixedRealityCameraRig throws NRE #649

Closed FejZa closed 4 years ago

FejZa commented 4 years ago

XRTK - Mixed Reality Toolkit Bug Report

Describe the bug

Selecting the Create new IMixedRealityCameraRig option in the global camera data provider profile Camera Rig Type setting options throws a NRE.

To Reproduce

  1. Select the XRTK Game Object
  2. Navigate to the camera system profile
  3. Navigate to global camera profile
  4. Unfold the camera rig type dropdown options
  5. Select create new IMixedRealityCameraRig -> NRE log in console

Expected behavior

The menu item creates a new camera rig.

Actual behavior

NRE thrown and nothing happens.

Your Setup

Additional context

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorWindow.Close () (at C:/buildslave/unity/build/Editor/Mono/EditorWindow.cs:927)
XRTK.Editor.Utilities.MixedRealityServiceWizard.ShowNewServiceWizard (System.Type interfaceType) (at Packages/com.xrtk.core/Editor/Utilities/MixedRealityServiceWizard.cs:79)
XRTK.Editor.PropertyDrawers.TypeReferencePropertyDrawer+<>c__DisplayClass29_0.<DisplayDropDown>b__0 (System.Object data) (at Packages/com.xrtk.core/Editor/PropertyDrawers/TypeReferencePropertyDrawer.cs:347)
UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at C:/buildslave/unity/build/Editor/Mono/GUI/GenericMenu.cs:119)
StephenHodgson commented 4 years ago

Makes sense, you'll need to fully implement the new camera rig class you've created to prevent the NRE.

FejZa commented 4 years ago

Not sure I understand. Nothing is created after selecting the menu item.

StephenHodgson commented 4 years ago

There should be a new file that's created with the stub for your camera rig

FejZa commented 4 years ago

Ok. I'll check this later again. For now pretty sure nothing was created as my git didn't show any new files.

StephenHodgson commented 4 years ago

I wasn't able to reproduce the NRE right when you create the data provider.