hecomi / uWindowCapture

This allows you to use Windows Graphics Capture / PrintWindow / BitBlt in Windows to capture multiple windows individually and easily use them as Texture2D in Unity.
https://tips.hecomi.com/entry/2021/04/30/230322
MIT License
505 stars 81 forks source link

RaycastHit.Texturecoord returning Vector2.zero in the actual Build, but not in the Editor #23

Closed RNG42 closed 4 years ago

RNG42 commented 4 years ago

The RaycastHit is working in the Editor and i get the correct Vector2 values, but as soon as i build the Unity Application and run it outside the Editor RaycastHit.Texturecoord is returning Vector2.zero. The Window Transform has a MeshCollider, Convex is turned off. Doublechecked if the Texture is readable, which it is in the Editor as well as in the build. Any idea why this is happening? I am using Unity version 2019.2.13f1

RNG42 commented 4 years ago

Okay, got it working! The collider model "uWC_Board" Read/Write needed to be enabled, which solved my problem. closed