Search Unity

Question Anchors and Unity Mars

Discussion in 'Unity MARS' started by CreepyInpu, Jul 20, 2021.

  1. CreepyInpu

    CreepyInpu

    Joined:
    Oct 9, 2014
    Posts:
    23
    Hi !

    I'm in the process of migrating a native AR foundation app to Unity mars.

    In the app, we use anchors to place object with the function "AttachAnchor" (https://docs.unity3d.com/Packages/c..._ARFoundation_ARAnchorManager_AddAnchor_Pose_)

    I'm getting this error : "Anchor manager has no subsystem. Enable the manager first.". It seems to be because we're in the editor. Maybe this is not compatible with Unity mars ? If it's not, what would be the best way to achieve their effect (attaching an object on a plane) ?

    Edit : Also, if we can't use Anchors on Unity Mars, does it mean the object I'll position in AR will be unstable ?

    Thanks !
     
    Last edited: Jul 20, 2021
  2. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    297
    Hello @CreepyInpu,

    If you porting from AR Foundation you should be able to keep your existing anchor stuff. If you leave the existing AR Session, AR Origin etc in the scene, MARS will use them rather than creating its own, so everything will share the same space.

    The thing is that you will not be able to test ARF Anchors in the simulation view. Hope this helps :)
     
  3. CreepyInpu

    CreepyInpu

    Joined:
    Oct 9, 2014
    Posts:
    23
    Hi,

    Thanks for your reply ! So is there a recommended workflow for people that use anchor and want to use the simulation mode ? I'm guessing something like setting up a fake anchor or something and binding it to the floor to replicate the constraint. I'm trying to optimize the code so the simulator version is not too different than the real thing.
     
    Last edited: Jul 20, 2021
  4. merrythieves

    merrythieves

    Joined:
    Apr 28, 2021
    Posts:
    14
    @CreepyInpu I am trying to accomplish the same thing and have been trying to implement it using persistent cloud anchors. It would be amazing to be able to align my 3d scan of an environment to a simulated anchor and be done with it.

    Unity seems to advertise the MARS can solve this problem by understanding the environment, but it actually can't. It is just using GPS and image anchors apparently. So now I'm back to thinking cloud anchors are the solution and trying to get a scene aligned with them.

    This is the workflow I want:


    But the tool used in the example doesn't work in environments with non-static lighting (outdoors).
     
    Last edited: Jul 20, 2021