public void OnSceneSlotButtonClick(int _slotIndex) { SceneSavingManager.SetSlotIndex(_slotIndex); if (inRemoveSceneMode) { sceneSlotButtons[_slotIndex].interactable = false; SceneSavingManager.Delete(); } else { SceneManager.LoadSceneAsync(2); } }
void OnSceneLoaded(Scene _scene, LoadSceneMode _mode) { Block.RestoreStaticFields(); if (_scene.buildIndex != 1) { SceneSavingManager.LoadRowAndColumn(); } TopLeftCornerPos = new Vector3( (2 * centerPos.x - (colCount - 1) * blockSeparation) / 2 , centerPos.y , (2 * centerPos.z - (rowCount - 1) * blockSeparation) / 2); BlockExtents = prefabBlock.GetComponent <MeshRenderer>().bounds.extents * 2; GetGenerated(0, rowCount, 0, colCount); if (_scene.buildIndex != 1) { SceneSavingManager.LoadBlocks(); } }
public void OnSceneSlotButtonClick(int _slotIndex) { SceneSavingManager.SetSlotIndex(_slotIndex); SceneSavingManager.Save(); saveSceneButton.onClick.Invoke(); }