ValveSoftware / steamvr_unity_plugin

SteamVR Unity Plugin - Documentation at: https://valvesoftware.github.io/steamvr_unity_plugin/
BSD 3-Clause "New" or "Revised" License
1.03k stars 255 forks source link

Teleport Destination drawing order is incorrect when building with URP #875

Open shiena opened 3 years ago

shiena commented 3 years ago

Environment

Probably due to Assets/SteamVR/InteractionSystem/Teleport/Shaders/Highlight.shader. For some reason, it is a normal drawing order in Unity Editor.

URP

image image

Builtin

image image

shiena commented 3 years ago

It may be the same as problem https://github.com/ValveSoftware/steamvr_unity_plugin/issues/422

shiena commented 3 years ago

I found a solution. Replaces the TeleportXXX material in the Teleporting prefab with the URP TeleportXXX material. image

shiena commented 3 years ago

I found the cause of the incorrect drawing of the built application. Teleporting prefab replaces the material with TeleportURPHelper.cs. However, since the #if UNITY_UDP && UNITY_EDITOR directive is specified, it cannot be replaced when building. https://github.com/ValveSoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/InteractionSystem/Teleport/Scripts/TeleportURPHelper.cs#L11

URPMaterialSwitcher.cs is similar. https://github.com/ValveSoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/InteractionSystem/Samples/Scripts/URPMaterialSwitcher.cs#L14

zite commented 3 years ago

yeah, the intention is to get this changed in editor so it doesn't need to be done at runtime. Are you finding this does not get run / saved in editor?

kannankans52 commented 2 years ago

Teleport Destination drawing order is incorrect when building with URP please find Above issue and please instruct me how to fix this issue

kannankans52 commented 2 years ago

Replying to https://github.com/ValveSoftware/steamvr_unity_plugin/issues/875#issue-763516950

Teleport Destination drawing order is incorrect when building with URP please find Above issue and please instruct me how to fix this issue

kannankans52 commented 2 years ago

Replying to #875 (comment)

Teleport Destination drawing order is incorrect when building with URP please find Above issue and please instruct me how to fix this issue

Thanks for your reply,

I am using URP Material for that teleporting with 3D plane it's working fine. but when I try to teleport inside any gameobject(Cube..) the Destination Reticle and Raycast but is not visible. so i try with normal material which means without URP material, now in this case working fine with gameobject(Cube) but it's not visible in 3d plane.

Please fix this issue ASAP.

Mecon0710 commented 10 months ago

Were you able to fix it in the end? What did you do?