public void LoadData(string nameFile) { SerializeSystem saveSystem = SaveSystem.LoadObject(nameFile); referencesToObjectsForRemove = GetReferencesToInstances(); currentStatusDoma.appSystem = null; if (saveSystem == null) { var startSystem = new AppSystem(); currentStatusDoma.appSystem = startSystem; SetActiveFloorById(0); currentStatusDoma.ShowWalls2dOnFloors(new Guid[] { currentStatusDoma.activeFloor.Id }); return; } else { currentStatusDoma.appSystem = new AppSystem(saveSystem); foreach (var wall in currentStatusDoma.appSystem.Walls) { wall.Instance2D = wall.DrawWall2D(); wall.Instance3D = wall.DrawWall3D(); } foreach (var ceiling in currentStatusDoma.appSystem.Ceilings) { ceiling.Instance2D = ceiling.DrawCeiling2D(); ceiling.Instance3D = ceiling.DrawCeiling3D(); } foreach (var roof in currentStatusDoma.appSystem.Roofs) { //roof.Instance2D = roof.DrawRoofType1(); roof.Instance3D = roof.DrawRoof3D(); } SetActiveFloorById(0); currentStatusDoma.ShowWalls2dOnFloors(new Guid[] { currentStatusDoma.appSystem.Floors[0].Id }); } RemoveAllInstances(referencesToObjectsForRemove); }
private void dropDownValueChangedHandler(TMP_Dropdown target) { domaManager.SetActiveFloorById(target.value); currentStatusDoma.ShowWalls2dOnFloors(new Guid[] { currentStatusDoma.activeFloor.Id }); }