Merge pull request #52308 from rxlecky/parallax-layer-position-reset-fix-issue-51914

Fix ParallaxLayer's transform resetting in editor
This commit is contained in:
Rémi Verschelde 2021-09-15 13:16:56 +02:00 committed by GitHub
commit eb1262f6ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -100,6 +100,10 @@ void ParallaxLayer::_notification(int p_what) {
_update_mirroring(); _update_mirroring();
} break; } break;
case NOTIFICATION_EXIT_TREE: { case NOTIFICATION_EXIT_TREE: {
if (Engine::get_singleton()->is_editor_hint()) {
break;
}
set_position(orig_offset); set_position(orig_offset);
set_scale(orig_scale); set_scale(orig_scale);
} break; } break;