Skip to content

Error when adding images from local or persistence path to XRRefernceImageLibrary at runtime in unity #22

@sivamuruganszi

Description

@sivamuruganszi

Hi,
I have taken one of the example scene (ImageTrackingRuntimeSave) from the UnityARFoundationEssentials project for adding images to XRImageLibrary at runtime.

I have made some changes on that code, like instead of adding the images from unity i loaded it from persistence path, it was working fine initially. After some point of time it was giveing some issue on while adding the images to the library.
Even if i load images from my asset folder to XRImageLibrary it is give me an error.

This is the error which i am getting from the script.
System.NullReferenceException: Object reference not set to an instance of an object at DynamicLoading+<AddImage>d__6.MoveNext () [0x0009a] in

When i further debug the code its showing error in texture format line, but in my project i have made those images to Read/Write enable and format to RGBA32.

image

But still i am getting the error.
Could someone explain me how to solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions