Example #1
0
    public void SavePressed()
    {
        if (!_saveManager.gameObject.activeSelf)
        {
            if (_saveManager.LoadInteractable)
            {
                _saveManager.LoadInteractable = false;
            }
            for (int i = 0; i < _objectList.Count; i++)
            {
                Transform transform = _objectList[i].transform;
                _roomObjects.SetScaleAt(i, transform.localScale.x, transform.localScale.y, transform.localScale.z);
                _roomObjects.SetPosAt(i, transform.localPosition.x, transform.localPosition.y, transform.localPosition.z);
                _roomObjects.SetRotAt(i, transform.localEulerAngles.x, transform.localEulerAngles.y, transform.localEulerAngles.z);
            }

            _settingsSO.StaticFixtureSOList.Copy(_roomObjects);
            _saveManager.gameObject.SetActive(true);
            _saveManager.TitleText = "Save Result";
        }
        else
        {
            _saveManager.gameObject.SetActive(false);
        }
    }
Example #2
0
    public void FinishedPressed()
    {
        if (SceneManager.GetActiveScene().name == "EditRoomScene")
        {
            for (int i = 0; i < _objectList.Count; i++)
            {
                Transform transform = _objectList[i].transform;
                _roomObjects.SetScaleAt(i, transform.localScale.x, transform.localScale.y, transform.localScale.z);
                _roomObjects.SetPosAt(i, transform.localPosition.x, transform.localPosition.y, transform.localPosition.z);
                _roomObjects.SetRotAt(i, transform.localEulerAngles.x, transform.localEulerAngles.y, transform.localEulerAngles.z);
            }

            SceneManager.LoadScene("SettingScene");
        }
        else if (SceneManager.GetActiveScene().name == "ViewScene")
        {
            SceneManager.LoadScene("StartScene");
        }
    }