1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Portals - add reason string to unload message

To help users identify conditions that are causing room system invalidation, a reason message is passed to the unload function and logged.
This commit is contained in:
lawnjelly
2021-09-24 14:00:24 +01:00
parent c26547414d
commit 279e6f65cd
12 changed files with 29 additions and 21 deletions

View File

@@ -1316,10 +1316,10 @@ void VisualServerScene::room_set_bound(RID p_room, ObjectID p_room_object_id, co
room->scenario->_portal_renderer.room_set_bound(room->scenario_room_id, p_room_object_id, p_convex, p_aabb, p_verts);
}
void VisualServerScene::rooms_unload(RID p_scenario) {
void VisualServerScene::rooms_unload(RID p_scenario, String p_reason) {
Scenario *scenario = scenario_owner.getornull(p_scenario);
ERR_FAIL_COND(!scenario);
scenario->_portal_renderer.rooms_unload();
scenario->_portal_renderer.rooms_unload(p_reason);
}
void VisualServerScene::rooms_and_portals_clear(RID p_scenario) {