Fix ParallaxBackground breaking when moving it out the scene tree
(cherry picked from commit 359d7f178c
)
This commit is contained in:
parent
c70a3671b0
commit
abf19bdab2
|
@ -105,6 +105,11 @@ void ParallaxLayer::_notification(int p_what) {
|
|||
orig_scale = get_scale();
|
||||
_update_mirroring();
|
||||
} break;
|
||||
case NOTIFICATION_EXIT_TREE: {
|
||||
|
||||
set_position(orig_offset);
|
||||
set_scale(orig_scale);
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue