Unity version
6000.4.3f1
Where does the issue occur?
Description
This issue occurs while setting up Unity-DepthAPI / a fresh Unity URP project for testing Depth API on Meta Quest 3.
Unity fails to import the following asset from the Meta XR Core SDK package:
Packages/com.meta.xr.sdk.core/Editor/BuildingBlocks/Icons/ovr_icon_break_bb_connection.png
The Unity Console shows
Could not create asset from Packages/com.meta.xr.sdk.core/Editor/BuildingBlocks/Icons/ovr_icon_break_bb_connection.png: File could not be read
After investigating the file contents, the file appears to have a .png extension but contains WebP data.
Actual file header
52-49-46-46-50-06-00-00-57-45-42-50-56-50-38-58
This corresponds to
RIFF....WEBPVP8X
A valid PNG file should start with:
89-50-4E-47-0D-0A-1A-0A
After converting this file from WebP to an actual PNG using Pillow, the import error disappears.
This seems to be caused by the Meta XR Core SDK package rather than the Depth API sample package itself, but it occurs during the setup flow for Unity-DepthAPI.
Steps to reproduce
- Create a fresh Unity URP project.
- Switch the platform to Android.
- Install the packages required to test Depth API:
- Meta XR Core SDK
- OpenXR Plugin
- Unity OpenXR: Meta
- XR Plugin Management
- Universal RP
com.meta.xr.depthapi.urp
- Open the project in Unity.
- Check the Unity Console.
Alternatively
- Clone
oculus-samples/Unity-DepthAPI.
- Open the
DepthAPI-URP project in Unity.
- Install / resolve the required Meta XR packages.
- Check the Unity Console.
Logs
Could not create asset from Packages/com.meta.xr.sdk.core/Editor/BuildingBlocks/Icons/ovr_icon_break_bb_connection.png: File could not be read
Additional info
The issue appears to be a file format mismatch:
-
File path : Packages/com.meta.xr.sdk.core/Editor/BuildingBlocks/Icons/ovr_icon_break_bb_connection.png
-
Extension : .png
-
Actual contents : WebP / RIFF
-
Expected : Valid PNG data, or a .webp extension if WebP is intended.
Workaround used locally
from pathlib import Path
from PIL import Image
import io
p = Path(r"Library\PackageCache\com.meta.xr.sdk.core@f8b4cfb2789f\Editor\BuildingBlocks\Icons\ovr_icon_break_bb_connection.png")
data = p.read_bytes()
img = Image.open(io.BytesIO(data))
img.save(p, format="PNG")
Unity version
6000.4.3f1
Where does the issue occur?
Description
This issue occurs while setting up Unity-DepthAPI / a fresh Unity URP project for testing Depth API on Meta Quest 3.
Unity fails to import the following asset from the Meta XR Core SDK package:
Packages/com.meta.xr.sdk.core/Editor/BuildingBlocks/Icons/ovr_icon_break_bb_connection.pngThe Unity Console shows
Could not create asset from Packages/com.meta.xr.sdk.core/Editor/BuildingBlocks/Icons/ovr_icon_break_bb_connection.png: File could not be readAfter investigating the file contents, the file appears to have a
.pngextension but contains WebP data.Actual file header
52-49-46-46-50-06-00-00-57-45-42-50-56-50-38-58This corresponds to
RIFF....WEBPVP8XA valid PNG file should start with:
89-50-4E-47-0D-0A-1A-0AAfter converting this file from WebP to an actual PNG using Pillow, the import error disappears.
This seems to be caused by the Meta XR Core SDK package rather than the Depth API sample package itself, but it occurs during the setup flow for Unity-DepthAPI.
Steps to reproduce
com.meta.xr.depthapi.urpAlternatively
oculus-samples/Unity-DepthAPI.DepthAPI-URPproject in Unity.Logs
Additional info
The issue appears to be a file format mismatch:
File path :
Packages/com.meta.xr.sdk.core/Editor/BuildingBlocks/Icons/ovr_icon_break_bb_connection.pngExtension : .png
Actual contents : WebP / RIFF
Expected : Valid PNG data, or a .webp extension if WebP is intended.
Workaround used locally