Copyright © 2026 Unity Technologies
In order to retrieve valid uv-coordinates the CPU data for a mesh needs to be preserved. This can be done by marking a mesh as read/write enabled (as can be seen on CP_Infield). There are also other features in the engine that preserve the mesh data on the CPU (such as mesh deformations or dynamic batching). Some of the meshes (< 300 vertices) in the project have their CPU data preserved because they can be dynamically batched. As a result of this, the ray-cast can return non-zero values for the UV coordinates. Marking all meshes as read/write on the importer provides the expected results.
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/UVCoordsTest/SampleUV.unity” Scene
4. Build and Run
5. Enter the Play Mode
6. Open the Player.log file
7. Compare the log messages present in Player.log to the messages in the Console window
Expected result: All Raycasts are hitting the Mesh Colliders
Actual result: “SampleCoord. Hit: 5”, “SampleCoord. Hit: 6”, and “SampleCoord. Hit: 7” shows 0 for all Vectors
Reproducible with: 2021.3.32f1, 2022.3.14f1, 2023.2.1f1, 2023.3.0a16
Reproducible on:
IOS devices (User reported)
VLNQA00325, Samsung Galaxy Note10 (SM-N970F), Android 12, CPU: Exynos 9 (9825), GPU: Mali-G76
VLNQA00318, Oneplus OnePlus 7 Pro (GM1913), Android 11, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00231, Huawei HUAWEI Mate 20 Pro (LYA-L29), Android 9, CPU: HiSilicon Kirin 980, GPU: Mali-G76
VLNQA00231, Samsung Galaxy A5(2017) (SM-A520F), Android 8.0.0, CPU: Exynos 7 Octa 7880, GPU: Mali-T830
VLNQA00332, Samsung Galaxy XCover4 (SM-G390F), Android 9, CPU: Exynos 7 Quad 7570, GPU: Mali-T720
Testing environment: Windows 10 Enterprise 21H2
Not reproducible on: No other environment tested
Notes:
Issues you vote on will appear here