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.

Question Unable to create MARS session

Discussion in 'Unity MARS' started by hmkn, Jan 8, 2021.

  1. hmkn

    hmkn

    Joined:
    Nov 7, 2019
    Posts:
    23
    Hi I faced this error when I add MARS Session and MARS Proxy Rule.
    Please help to solve this error.

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Unity.MARS.MARSSession.SessionConfigured (Unity.MARS.MARSSession session) (at Library/PackageCache/com.unity.mars@1.2.0/Runtime/Scripts/MARSSession.cs:300)
    3. Unity.MARS.MARSSession.EnsureRuntimeState (UnityEngine.Transform overrideUserRef) (at Library/PackageCache/com.unity.mars@1.2.0/Runtime/Scripts/MARSSession.cs:185)
    4. Unity.MARS.CreateMenuItems.CreateRulesetObject (UnityEditor.MenuCommand command) (at Library/PackageCache/com.unity.mars@1.2.0/Editor/Scripts/Extensions/CreateMenuItems.cs:177)
    5. UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32) (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/GenericMenu.cs:119)
    6.  
     
  2. hmkn

    hmkn

    Joined:
    Nov 7, 2019
    Posts:
    23
    I was able to solved this by myself.
    I found MARS Session component was present without MARS Camera component. So I removed old MARS Session completely then added successfully.
    Thanks.