wave-harmonic / crest

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

Pressing the Windows Key in the editor disables underwater rendering #1124

Open Revmatek opened 1 year ago

Revmatek commented 1 year ago

Is there an existing issue for this?

Have you checked the documentation to resolve your problem?

Current Behavior

While debugging gameplay or otherwise using the editor with camera above or below water pressing the windows key disables the ocean

image

Expected Behavior

Pressing the windows key in the editor should not disable features

image

Steps To Reproduce

  1. Open the "main" scene
  2. Hit play
  3. Move the camera underwater
  4. Press the windows key
  5. Observe most of the ocean (underwater) disappears

Unity Version

2021.3.26f1

Crest Version

4.17.3

Render Pipeline

Built-In

Editor or Standalone

Editor (Edit Mode), Editor (Play Mode)

Environment

- OS: Windows

Anything else?

This does not occur at runtime so it is not really a big deal. It can also happen in scene view. This was known working in 4.15.2

daleeidd commented 1 year ago

This is due to Unity going out of focus where Crest will pause any work so some things may stop working. This was added as doing work when out of focus has always been problematic in the editor (source of leaks) and saves on energy.

I'll leave this open for a while as I may look at it again and maybe keep the UR running.

Revmatek commented 2 months ago

For anyone reading you can disable this by commenting out all the references to: UnityEditorInternal.InternalEditorUtility.isApplicationActive image

Revmatek commented 2 months ago

This is due to Unity going out of focus where Crest will pause any work so some things may stop working. This was added as doing work when out of focus has always been problematic in the editor (source of leaks) and saves on energy.

I'll leave this open for a while as I may look at it again and maybe keep the UR running.

This is useful for testing things locally in multiplayer and it can be problematic sometimes when underwater tests are happening. Could be a flag or something.