diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2021-09-15 13:16:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-15 13:16:56 +0200 |
| commit | eb1262f6ea1770c6ba5fef57d1242b6f7a73b54a (patch) | |
| tree | 1e057522e559148dcc133c8bcfa32e771a6f939c | |
| parent | 13eff7de690073d37e4f67cceee856fbc5491326 (diff) | |
| parent | 7741afb55a3ad5a11097ff723e8bee4f69ba13d1 (diff) | |
Merge pull request #52308 from rxlecky/parallax-layer-position-reset-fix-issue-51914
Fix ParallaxLayer's transform resetting in editor
| -rw-r--r-- | scene/2d/parallax_layer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp index 1fe6a4a4b8..67e35cc7a3 100644 --- a/scene/2d/parallax_layer.cpp +++ b/scene/2d/parallax_layer.cpp @@ -100,6 +100,10 @@ void ParallaxLayer::_notification(int p_what) { _update_mirroring(); } break; case NOTIFICATION_EXIT_TREE: { + if (Engine::get_singleton()->is_editor_hint()) { + break; + } + set_position(orig_offset); set_scale(orig_scale); } break; |