Skip to content

[BUG] Meta XR Core SDK contains .png file with WebP contents causing Unity import error #97

@Takio0304

Description

@Takio0304

Unity version

6000.4.3f1

Where does the issue occur?

  • In Unity Editor
  • In Quest builds

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

  1. Create a fresh Unity URP project.
  2. Switch the platform to Android.
  3. 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
  4. Open the project in Unity.
  5. Check the Unity Console.

Alternatively

  1. Clone oculus-samples/Unity-DepthAPI.
  2. Open the DepthAPI-URP project in Unity.
  3. Install / resolve the required Meta XR packages.
  4. 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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions