steamvr_unity_plugin icon indicating copy to clipboard operation
steamvr_unity_plugin copied to clipboard

Teleport Destination drawing order is incorrect when building with URP

Open shiena opened this issue 5 years ago • 8 comments

Environment

  • Unity2019.4.16f1
  • SteamVR Unity Plugin v2.6.1
  • URP 7.3.1

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 avatar Dec 12 '20 09:12 shiena

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

shiena avatar Dec 12 '20 12:12 shiena

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

shiena avatar Dec 12 '20 14:12 shiena

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

shiena avatar Dec 12 '20 14:12 shiena

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?

keithbradner avatar Dec 18 '20 00:12 keithbradner

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

kannankans52 avatar Nov 15 '21 07:11 kannankans52

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 avatar Nov 15 '21 11:11 kannankans52

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.

kannankans52 avatar Dec 08 '21 09:12 kannankans52

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

Mecon0710 avatar Nov 21 '23 15:11 Mecon0710