Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Resolved MARS Device View

Discussion in 'Unity MARS' started by Tryll, May 11, 2021.

  1. Tryll

    Tryll

    Joined:
    Oct 16, 2015
    Posts:
    30
    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.
     
  2. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    295
    hello @Tryll,

    For moving in device view you have to keep pressed right click to move around and also press play, checkout: ezgif-3-fe1b4e9d4eba.gif
     
  3. Tryll

    Tryll

    Joined:
    Oct 16, 2015
    Posts:
    30
    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. ??
     
  4. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    295
    mmmm thats really strange. Lets try some things:

    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?
     
  5. Tryll

    Tryll

    Joined:
    Oct 16, 2015
    Posts:
    30
    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.SynthesizedTrackable`1[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.SynthesizedTrackable`1[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)​
     
  6. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    295
    And this happens also after closing and opening unity again, correct?.

    Are you able to reproduce this on an empty project?
     
  7. Tryll

    Tryll

    Joined:
    Oct 16, 2015
    Posts:
    30
    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?
     
  8. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    295
    We are looking into this, what OS are you running, OSX or Windows?
     
  9. Tryll

    Tryll

    Joined:
    Oct 16, 2015
    Posts:
    30
    My dev system is OSX (Mojave)
     
    jmunozarUTech likes this.
  10. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    295
    Hello @Tryll

    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.

    Thanks for notifying us about this :)
     
  11. Tryll

    Tryll

    Joined:
    Oct 16, 2015
    Posts:
    30
    Excellent! I was sure I was missing something obvious.
     
    jmunozarUTech likes this.