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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Resolved Error in Runtime Reference Image Library

Discussion in 'AR' started by CheolSoonKim, Jun 28, 2021.

  1. CheolSoonKim

    CheolSoonKim

    Joined:
    Jun 25, 2021
    Posts:
    2
    Hi I'm new to Unity and i'm trying to add new reference image at runtime.

    https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/manual/tracked-image-manager.html
    I saw some way to add runtime reference image in this page but it don't works exactly.

    here is my code

    Code (CSharp):
    1.  if (arTrackedImageManager.referenceLibrary is MutableRuntimeReferenceImageLibrary mutableLibrary)
    2.         {
    3.             Debug.Log("ReferenceImage Added.");
    4.             jobState = mutableLibrary.ScheduleAddImageWithValidationJob(markerImage, "keypad", 0.07f);
    5.             Debug.Log("Image Library Count : " + mutableLibrary.count + jobState.status + jobState.ToString());
    6.         }
    ScheduleAddImageWithValidationJob method always return jobState.status.ErrorUnknown and i don't know why it returns error. can anyone tell me why?
     
  2. CheolSoonKim

    CheolSoonKim

    Joined:
    Jun 25, 2021
    Posts:
    2
    Now I figured it out. It returns error when I add runtime library while AR Session is not ready.
     
  3. Slashik

    Slashik

    Joined:
    Jan 26, 2016
    Posts:
    6
    Hi @CheolSoonKim, can you tell me when how to make AR Session Ready?
     
  4. andyb-unity

    andyb-unity

    Unity Technologies

    Joined:
    Feb 10, 2022
    Posts:
    795