crest icon indicating copy to clipboard operation
crest copied to clipboard

Make ocean tiles non-pickable by default

Open huwb opened this issue 1 year ago • 1 comments

Issue #1056

Makes ocean tiles non-pickable by default, adds debug option for it.

This will stomp the users preference for pickability. However pickability is almost never desired I guess. And there's a debug option to disable it if need be. LMK what you think.

I initially just intended to respect the pickability state of the ocean gameobject and propagate it to the tiles but it was a non-starter it seems - simply querying pickability of the ocean using SceneVisibilityManager.instance.IsPickingDisabled(ocean.gameObject) seems to clear the pickability flag on the ocean when exiting playmode. It's as if the pickability state is left hanging after exiting play mode, and then querying it refreshes it to default (pickable).

huwb avatar Jul 31 '22 08:07 huwb

A side effect that might not be obvious: When the sea tiles are pickable, it breaks snapping objects together in the editor. It took a long time for me to figure out why my floor tiles up high would not snap to each other, but this turned out to be the cause (as from a sufficient distance moving the target passed over dozens of sea tile snap points).

Please merge this 🤞

NewColours avatar Aug 09 '22 11:08 NewColours

@NewColours you could lock the Water layer instead? That appears to hold up even on editor restarts. Let me know how you go.

Reference: https://blog.theknightsofunity.com/hide-lock-layer-scene-window/

daleeidd avatar Oct 04 '22 13:10 daleeidd

Closing in favour of #1066

daleeidd avatar Oct 04 '22 13:10 daleeidd