- Home /
AR Foundation: Adding image to MutableRuntimeReferenceLibrary returns the status "ErrorUnknown"
Hi! I'm trying to add images to the tracked image manager in runtime, using the following code:
void AddImage(Texture2D imageToAdd)
{
if (m_TrackedImageManager.referenceLibrary is MutableRuntimeReferenceImageLibrary mutableLibrary)
{
//Used in case the image is in a TextureFormat not supported by the image library
if (imageToAdd.format != TextureFormat.RGBA32)
{
Debug.Log("Different format");
imageToAdd = ChangeFormat(imageToAdd, TextureFormat.RGBA32);
}
//Add the image to the library
var addImageJob = mutableLibrary.ScheduleAddImageWithValidationJob(
imageToAdd,
"john",
0.3f);
//Wait for the add image job to end while debugging its status
while (!addImageJob.jobHandle.IsCompleted)
{
Debug.Log("Adding images");
Debug.Log("Status: " + addImageJob.status);
}
Debug.Log("Status: " + addImageJob.status);
Debug.Log("Library Count: " + mutableLibrary.count);
}
}
In the process of adding the image, the status is logged as "None" several times, but eventually it becomes "Error Unknown".
I have tested this with different images, with different TextureFormats and both jpg's and png's, and they all return the same result.
I also thought that it could happen because the image had insufficient features. However, I also tried with the example marker in ARCore page and even used their arcoreimg tool to check the quality score of the images I used.
Do you know what can be the cause of this error? I know it says the error is unknown, but it probably has a solution :).
Thanks!
Your answer
Follow this Question
Related Questions
Time based Augmented Reality application 0 Answers
how can i create a count down AR object that depends on a variable of remainnig stock? 1 Answer
Face tracking compatibility with iOS older than iPhoneX 0 Answers
How can I re-position the world origin in AR? 0 Answers
Hololens: Share a WorldAnchor between individual apps 0 Answers