Azure / azure-remote-rendering

SDK and samples for Azure Remote Rendering
MIT License
104 stars 39 forks source link

[Remote rendering problem] No errors thrown, but Unity game window not showing remote model #106

Closed whatthemehek closed 1 year ago

whatthemehek commented 1 year ago

I am trying to set up a default ARR project, with Unity 2022.2.0f and 3D URP. I've successfully set up a few other default ARR projects in Unity 2020, and so followed the instructions to create RemoteRenderingCoordinator and connect my Azure account. I also followed the instructions to switch the render pipeline to the one provided in the ARR assets, since I am on a 3D URP project.

When I run the project in Unity, the debug messages are all as expected- showing the progression through states until the runtime is connected, no error messages, or anything. I right-click on the RemoteRenderingCoordinator script component, click Load Test Model, it prints progress percentages of being loaded, but when it hits 100% nothing displays.

I know the problem isn't with my Azure account, as other projects using the same credentials are still working fine.

I also have no issues in the project validator or in my build settings.

jloehr commented 1 year ago

Hey, I was able to reproduce this issue with Unity 2022.2.0. It seems to be some weird behaviour of the Unity script importer. We have a fix for it in flight, but no ETA for the next release yet.

In the mean time you can work around it by either:

  1. Update and use Unity 2022.3 LTS. I was unable to reproduce the bug with that version.

Or:

  1. Embed the Azure Remote Rendering package in your project following this Unity guide: Copying a Unity package from the cache
  2. Change the access modifier of the HolographicRemotingCallbackPass class from internal to private in the file com.microsoft.azure.remote-rendering\Runtime\HybridRenderingPassFeature.cs
whatthemehek commented 1 year ago

Tried both fixes, neither worked. The only things I noticed that are different than in the tutorial is that there is no USB device option in build settings in Unity 2022.2.x or 2022.3.x. Both changing the access modifier and Unity 2022.3 LTS are not working for me.

jloehr commented 1 year ago

Sorry to hear that neither fix worked for you. Something I forget to mention, I had to reimport the ARR package once, by right-clicking on it in the Project Window under the Packages foldout, and select Reimport from the context menu.

Is there any change you can provide us your project, so we can investigate further? If so, please make sure to remove any credentials beforehand.

I also have some additional questions to diagnose the issue further:

whatthemehek commented 1 year ago

It seems like the issue is probably with URP. I started with an ARR project that was working properly (2020.3, non URP, local and remote content), and then followed the instructions to switch to URP. The local content continues to render correctly, but the remote content stops rendering, though there aren't any error messages. I have attached a screenshot of my graphics configuration in Project Settings.

image

whatthemehek commented 1 year ago

Okay, seems like for 2020.3 I fixed the bug! The issue is, in the docs it says to update the Render Pipeline setting under the Graphics tab, but not the pipeline setting under the Quality tab. Updating both to the HybridRenderingPipeline asset seems to have fixed the issue. Will test with 2022.2 and see if that carries over.

whatthemehek commented 1 year ago

Tested with 2022.2, working!