Skip to content

Commit 174e1ba

Browse files
committed
Split out the null case from the isReadable case
1 parent e316e74 commit 174e1ba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Assets/MRTK/Core/Definitions/InputSystem/MixedRealityRaycastHit.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ public MixedRealityRaycastHit(bool raycastValid, RaycastHit hitInfo)
3434
triangleIndex = hitInfo.triangleIndex;
3535

3636
MeshCollider meshCollider = hitInfo.collider as MeshCollider;
37-
if (meshCollider == null || meshCollider.sharedMesh.isReadable)
37+
if (meshCollider == null)
38+
{
39+
textureCoord = hitInfo.textureCoord;
40+
textureCoord2 = hitInfo.textureCoord2;
41+
lightmapCoord = hitInfo.lightmapCoord;
42+
}
43+
else if (meshCollider.sharedMesh.isReadable)
3844
{
3945
#if UNITY_2019_4_OR_NEWER
4046
if (meshCollider.sharedMesh.HasVertexAttribute(UnityEngine.Rendering.VertexAttribute.TexCoord0))

0 commit comments

Comments
 (0)