Skip to content

Commit e68f03a

Browse files
committed
Merge pull request godotengine#90282 from jhlothamer/issue_84221
Fix sharing World2D between SubViewports causes 2D lights of one SubViewport to go missing
2 parents 4d2e8e4 + b250660 commit e68f03a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scene/2d/light_2d.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ void Light2D::_physics_interpolated_changed() {
203203

204204
void Light2D::_notification(int p_what) {
205205
switch (p_what) {
206-
case NOTIFICATION_ENTER_TREE: {
206+
case NOTIFICATION_ENTER_CANVAS: {
207207
RS::get_singleton()->canvas_light_attach_to_canvas(canvas_light, get_canvas());
208208
_update_light_visibility();
209209
} break;
@@ -227,7 +227,7 @@ void Light2D::_notification(int p_what) {
227227
}
228228
} break;
229229

230-
case NOTIFICATION_EXIT_TREE: {
230+
case NOTIFICATION_EXIT_CANVAS: {
231231
RS::get_singleton()->canvas_light_attach_to_canvas(canvas_light, RID());
232232
_update_light_visibility();
233233
} break;

0 commit comments

Comments
 (0)