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. Dismiss Notice

Question Unity Mars and Asset Bundles not working (Reference to marker library is broken)

Discussion in 'Unity MARS' started by RomeoBa, Oct 12, 2022.

  1. RomeoBa


    Feb 14, 2019

    I'm getting started with Unity Mars. I have a scene with my Image Marker Library and game objects to be instantiated set up. Everything works fine when I test using the simulator. For my purposes, I need to download the asset bundle from a server. I decided to create two asset bundles, one with the scene and the other with the assets (including the marker library). when I load the scene on my IOS device, I'm getting this error

    Code (CSharp):
    1. Default clip could not be found in attached animations list.
    2. MARS GeoLocation is not configured to request location service permission for this project. See 'GeoLocationModule' asset.
    3. Unity.MARS.Providers.GeoLocationModule:Unity.XRTools.ModuleLoader.IModule.LoadModule()
    4. Unity.XRTools.ModuleLoader.ModuleLoaderCore:LoadModulesWithTypes(List`1)
    5. Unity.MARS.MARSSession:Awake()
    7. [Subsystems] Subsystem ARKit-Input already instantiated, returning reference
    8. [Subsystems] Subsystem ARKit-Meshing already instantiated, returning reference
    9. Could not find XR Reference Library for XLTV 2 Mars Marker Library (Unity.MARS.Data.MarsMarkerLibrary)
    10. Unity.MARS.Providers.ARFoundation.ARFoundationMarkerProvider:SetActiveMarkerLibrary(IMRMarkerLibrary)
    11. Unity.MARS.MARSSession:Awake()
    13. InvalidOperationException: Cannot start image tracking without an image library.
    14.   at UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem.OnStart () [0x00000] in <00000000000000000000000000000000>:0
    15.   at UnityEngine.SubsystemsImplementation.SubsystemWithProvider.Start () [0x00000] in <00000000000000000000000000000000>:0
    17. Unloading 729 unused Assets to reduce memory usage. Loaded Objects now: 3190.
    18. Total: 11.551375 ms (FindLiveObjects: 0.126000 ms CreateObjectMapping: 0.059458 ms MarkObjects: 10.441209 ms  DeleteObjects: 0.924500 ms)
    I load my asset this way

    Code (CSharp):
    1.         if (state == GAME_STATE.DOWNLOAD_SUCCESS)
    2.         {
    3.             sceneAssetBundle = StorageHelper.ReadAndBuildAssetBundle(BookName, BookName);
    4.             memAssetBundle = StorageHelper.ReadAndBuildAssetBundle(BookName, "assets");
    5.             asyncOperation = SceneManager.LoadSceneAsync(BookName, LoadSceneMode.Single);
    6.             asyncOperation.allowSceneActivation = false;
    7.             state = GAME_STATE.SCENE_LOADING;
    8.         }
    I don't know what I'm doing wrong. is there a way to maybe dynamically set the marker library at runtime since the reference seems to be broken.

    Unity Version: 2022.1.18f1
    Arkit Plugin: 4.3.6
    ARFoundation: 4.0.12
    Unity Mars: 1.4.1