Log in or register to post comments

png file image targets do not work at runtime for Unity Editor Play Mode

February 9, 2021 - 9:12pm #1

Vuforia SDK Version: 9.7.4 -

Description with steps to reproduce: I followed the steps as described here: https://library.vuforia.com/articles/Solution/how-to-create-and-load-targets-in-unity.html

I used this plugin to load images from file: https://github.com/yasirkula/UnityNativeGallery
Specifically, I used

to load the images via scripts. When trying to load images from my computer while in Play mode, I realized that only .jpg images would successfully track. Files of .png would compile without error, but would never successfully be detected. -

Development OS (Mac OS X, Windows, Linux): Windows -

Mobile OS and Version: Android 9 -

Mobile Device Manufacturer and Model name: Google Pixel 2 (Computer is Dell Laptop Inspiron 15 5567) -

Do the Vuforia Sample Applications show the same behavior?: No

png file image targets do not work at runtime for Unity Editor Play Mode

February 9, 2021 - 11:50pm #2

Hi,

If it worked with jpg and not with png than I would assume there is an issue with the png images used. In order to create an Image Target at Run-time or via the Target Manager, the image needs to comply to following rules:

1.Your image is in one of the supported formats, PNG or JPEG

2.Your image is either grayscale or RGB-24 bit. This means that 32-bit images with an alpha channel (RGB + Alpha) are not allowed.

3.Your image size does not exceed 2.25 MB

Could you please check if the png has an alpha channel? Also please share with us the png image used so I can give it a try?

Thank you.

Vuforia Engine Support

Log in or register to post comments