Search Unity

  1. Unity wants to learn about your experiences working on a Unity project today. We'd like to hear from you via this survey.
    Dismiss Notice
  2. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  3. Dismiss Notice
  4. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Help Wanted Swap Mars Marker Library at runtime?

Discussion in 'Unity MARS' started by cam415, Jun 4, 2020.

  1. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    45
    Hello,
    When using image tracking markers, is it possible to swap one "Mars Marker Library" (located on the Mars Session script with another at runtime? Any guidance would be greatly appreciated. Thanks
     
  2. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    234
    Hello @cam415

    You can only have one Mars Marker Library per scene and is not possible to hot-swap libraries at runtime in MARS. But you can definitely have different marker libraries between scenes. May I ask what are you trying to accomplish?
     
    Last edited: Jun 4, 2020
  3. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    45
    Thanks @jmunozarUTech. I will try doing scene changes then.
    I am working on an installation that consists of one massive mural sized image made up of many smaller trackable images. Viewers are requested to input an image ID to view a specific section of the larger image. I'm having to use image IDs since many of the smaller images over lap and have similar visual features. The instantiated prefabs will be different depending on the position of the viewer.
    I'm pretty sure swapping the XRReferenceImage library at runtime is possible using ARFoundation 3.0 however I would like to figure out a solution in MARS. It seems like doing scene changes depending on the image ID input would be the best way to go? Thanks again.
     
  4. jmunozarUTech

    jmunozarUTech

    Unity Technologies

    Joined:
    Jun 1, 2020
    Posts:
    234
    @cam415 ah, now I understand the need for changing marker libraries. For the time being the best approach would be to use different scenes.

    Also, MARS underneath uses ARFoundation for image tracking so you should be able to switch your libraries using the ARFoundation APIs.

    Being said that, its on our roadmap to support switching libraries at runtime in MARS :)
     
  5. cam415

    cam415

    Joined:
    Mar 26, 2014
    Posts:
    45
    ah ok. Thanks for the heads up. I'll go ahead and try scene swapping for now.
     
    jmunozarUTech likes this.
unityunity