wave-harmonic / crest

A class-leading water system implemented in Unity
MIT License
3.5k stars 478 forks source link

[BUG] Seems spawning a prefab with any ocean is making the app freeze in HDRP + Unity 6 #1153

Open dganzella opened 4 months ago

dganzella commented 4 months ago

Is there an existing issue for this?

Have you checked the documentation to resolve your problem?

Current Behavior

When I try to spawn a prefab with any ocean, the app freezes.

No error log is generated and its impossible to interact with the app anymore.

Expected Behavior

Ocean be spawned, just like in editor.

Steps To Reproduce

Just install unity 6, add an ocean, and make a windows build using the HDRP pipeline

Unity Version

60000.7f

Crest Version

public const string HELP_URL_VERSION = "4.20.1";

Render Pipeline

High Definition

Editor or Standalone

Standalone

Environment

- OS: Windows 10
- GPU: GTX 3060 mobile
- Graphics API: I think direct X right
- Target Platform: Windows

Anything else?

fix plz ;_;

Update

I was able to make it work, if using graphics compositor, you must associate the ocean with the graphics compositor output camera, and not with any other camera of the composition. If you do, the app will freeze.

dganzella commented 4 months ago

Update: seems that, even in editor (unity 6), if you move the ocean in Y (still very close to origin), it stops working and starts to render weirdly break

update: this issue only happens if the scene window is open

dganzella commented 4 months ago

Update: I tried using an empty scene and it worked. So there is something in our main scene that is making Crest break. I wonder if that's because we are using HDRP Graphics compositor, or because we don't use the main camera, I'm gonna update the issue later with more details

Update: After a few tests, it seems that enabling the graphics compositor (which adds an extra special camera to the scene) is the issue.

I was able to make it work, if using graphics compositor, you must associate the ocean with the graphics compositor output camera, and not with any other camera of the composition. If you do, the app will freeze.

daleeidd commented 4 months ago

Thank you for identifying that one and the solution. I wasn't able to reproduce it myself, but happy to leave it with this workaround.