Search Issue Tracker

Duplicate

Votes

0

Found in

2019.4

2020.3

2020.3.15f2

2021.1

2021.2

2022.1

Issue ID

1375107

Regression

No

[Android] GetNativeTexturePtr function doesn't get the camera's information on Android devices

Android

-

How to reproduce:
1. Open the user's attached "RollABallTest.zip"
2. Build and Run on an Android device
3. Give the app Camera permission when asked

Expected results: The Camera's view can be seen in the app
Actual results: Instead of Camera view in the app it's black

Reproducible with: 2019.4.32f1, 2020.3.23f1, 2021.1.28f1, 2021.2.3f1, 2022.1.0a15

Reproducible on:
VLNQA00391, Xiaomi Redmi 9A (M2006C3LG), Android 10, CPU: MediaTek Helio G25 (MT6762G), GPU: PowerVR Rogue GE8320
----------, Oppo Reno Z 中国版 (PCDM10), Android 11, CPU: NOT FOUND, GPU: PowerVR Rogue GM9446
VLNQA00335, Samsung Galaxy S20+ 5G (SM-G986B), Android 10, CPU: Exynos 990, GPU: Mali-G77

Not reproducible on:
VLNQA00313, Huawei Y6 Ⅱ Compact (HUAWEI LYO-L01), Android 5.1, CPU: MediaTek MT6735, GPU: Mali-T720
iPhone 13 mini (iOS 15)
iPhone 8 Plus (14.4.2)
iPad Air 2 (11.0.3)

Notes:
- The issue is reproducible on Vulkan and OpenGLES3 Graphics APIs
- The code responsible for showing camera information and converting it to Texture2D:
p = cam.GetNativeTexturePtr();
im = Texture2D.CreateExternalTexture(cam.width, cam.height, TextureFormat.RGBA32, true, true, p);
im.Apply();
GetComponent<RawImage>().texture = im;

  1. Resolution Note:

    Fixed in Unity 2022.1.0a16

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.