I can’t seem to get the MARS Device View to be navigable. In Simulation View or Game View I can navigate with WASD and right-click (like normal Unity), although game view is (by default) restricted to “head level” movement on the Y-Axis (unless it is unlocked.)
But the Device View stays locked in place, even if I’ve launched the simulation with the toolbar “Play button”. It doesn’t respond to navigation input at all.
??
FWIW, I’m only using simulated image markers in my simulation scene at this time.
I’m pretty comfortable with the right-click WASD approach, and use it all the time in Unity. Like I said, it works fine in Scene, Game, and Simulation views.
I am setting my view modes for device view the same as the example you’ve provided, and I’m pressing play for the simulation.
Still, the device view seems to be locked to viewing straight down the X-axis and does not allow any navigation. ??
You mentioned you are using a synthetic image marker (which should affect it), does it still happen on a new scene?.
If you change the environment, does it still happen?
If you create a new project, does it work?.
Do you see any error logs in the Unity editor console?, how about on the OS editor log?
Changing the simulated environment results in the device view using whatever camera position and orientation is baked into the scene - so not necessarily “straight down the X”. BUT, the view remains unnavigable by keyboard and mouse.
Creating a new scene with only a MARS session, has the same results as above.
When I add the MARS session, it throws the following to the console:
NullReferenceException: Object reference not set to an instance of an object
Unity.MARS.Providers.IUsesCameraOffsetMethods.ApplyInverseOffsetToPose (Unity.MARS.Providers.IUsesCameraOffset obj, UnityEngine.Pose pose) (at Library/PackageCache/com.unity.mars@1.3.0/Interfaces/Subscribers/IUsesCameraOffset.cs:98)
Unity.MARS.Data.Synthetic.SynthesizedPose.GetTraitData () (at Library/PackageCache/com.unity.mars@1.3.0/Runtime/Scripts/Backend/SynthesizedObject/Trait/SynthesizedPose.cs:25)
Unity.MARS.Data.Synthetic.SynthesizedReferencePoint.GetData () (at Library/PackageCache/com.unity.mars@1.3.0/Runtime/Scripts/Backend/SynthesizedObject/Data/SynthesizedReferencePoint.cs:33)
Unity.MARS.Data.Synthetic.SynthesizedTrackable1[T].SafeAddTrackableData (System.Int32 dataID) (at Library/PackageCache/com.unity.mars@1.3.0/Runtime/Scripts/Backend/SynthesizedObject/Data/SynthesizedTrackable.cs:130) Unity.MARS.Data.Synthetic.SynthesizedTrackable1[T].AddSynthData (System.Int32 dataID) (at Library/PackageCache/com.unity.mars@1.3.0/Runtime/Scripts/Backend/SynthesizedObject/Data/SynthesizedTrackable.cs:122)
Unity.MARS.Data.Synthetic.SynthesizedObject.InitializeData () (at Library/PackageCache/com.unity.mars@1.3.0/Runtime/Scripts/Backend/SynthesizedObject/SynthesizedObject.cs:233)
Unity.MARS.Data.Synthetic.SynthesizedObject.OnEnable () (at Library/PackageCache/com.unity.mars@1.3.0/Runtime/Scripts/Backend/SynthesizedObject/SynthesizedObject.cs:69)
UnityEngine.MonoBehaviour:set_runInEditMode(Boolean)
Unity.XRTools.Utils.MonoBehaviourExtensions:StartRunInEditMode(MonoBehaviour) (at Library/PackageCache/com.unity.xrtools.utils@1.3.0/Runtime/Extensions/MonoBehaviourExtensions.cs:18)
UnityEditor.MARS.Simulation.SimulatedObjectsManager:AddSpawnedObjectToSimulation(GameObject)
Unity.XRTools.Utils.GameObjectUtils:Instantiate(GameObject, Transform, Boolean) (at Library/PackageCache/com.unity.xrtools.utils@1.3.0/Runtime/GameObjectUtils.cs:69)
Unity.MARS.MARSSession:EnsureSessionConfigured(MARSSession, UndoBlock, Transform) (at Library/PackageCache/com.unity.mars@1.3.0/Runtime/Scripts/MARSSession.cs:438)
Unity.MARS.MARSSession:EnsureRuntimeState(Transform) (at Library/PackageCache/com.unity.mars@1.3.0/Runtime/Scripts/MARSSession.cs:247)
Unity.MARS.CreateMenuItems:CreateMARSSessionObject(MenuCommand) (at Library/PackageCache/com.unity.mars@1.3.0/Editor/Scripts/Extensions/CreateMenuItems.cs:111)
Creating a new scene after closing and relaunching Unity did not repeat the error that was logged to the console.
But still the same locked-down Device View.
After creating a new project, with only MARS installed, and adding a MARS session to the scene, the result is the same. No navigation in the Device View, no errors showing.
Unity 2020 3.7f1 (But it has been the same in several base Unity versions.)
Is there anything else which would exclusively affect the Device View’s navigation?
We have managed to reproduce this issue on 2020.3.7+, Thanks for that!, good thing is this is already fixed on a patch release (1.3.1) coming out soon.
Two years later, I encountered the same bug, I guess.
I am working with Unity 2022.3.4f1 (pro version) and MARS 1.5.0 on a Windows 10 platform.
I followed every suggestion from @jmunozarUTech but nothing helps - navigation in device view is not possible. Do you have any tipps?
UPDATE:
tried Unity 2022.1.24f1 and 2022.2.2f1 - works (XR Interaction Toolkit 2.1.1)
tried Unity 2022.2.21f1 and 2022.3.2 - not working (XR Interaction Toolkit 2.4.0)
Found the workaround!!! First you right click as the documentation says, and while holding down the right mouse button, press and release the left mouse button. The while still holding down the right mouse button, you can interact in the Device View as expected.