//To Create 360 shot
    public void CreateNew360Shot()
    {
        if (!Check360InputFeildIsNull())
        {
            if (IsNameOfShot(loadListOfShotDetails, CaptureTemplateUI.Instance.nameOf360Shot.text))
            {
                int loadBetweenShots = int.Parse(CaptureTemplateUI.Instance.betweenShotsDropDown.options[CaptureTemplateUI.Instance.betweenShotsDropDown.value].text);

                if (CaptureTemplateUI.Instance.clockwise.activeInHierarchy)
                {
                    direction = Direction.RotationDirection.clockwise;
                }
                else
                {
                    direction = Direction.RotationDirection.counterClockwise;
                }
                ShotDetails newShot = new ShotDetails(ProductHandlerManager.Instance.product.name, CaptureTemplateUI.Instance.nameOf360Shot.text, int.Parse(CaptureTemplateUI.Instance.width360.text), int.Parse(CaptureTemplateUI.Instance.height360.text), loadBetweenShots, GetBetweenShots(loadBetweenShots), direction);
                if (CheckFolderIsCreated.JsonFolderCreation(ProductHandlerManager.Instance.product.name))
                {
                    CreateJsonFile(newShot);
                    GameObject newShotButton = GameObject.Instantiate(CaptureTemplateUI.Instance.ShotButtonPrefab);
                    newShotButton.GetComponent <RefrenceShotDetails>().shotDetails = newShot;
                    newShotButton.transform.SetParent(CaptureTemplateUI.Instance.shotsContainer.transform);
                    newShotButton.GetComponent <RefrenceShotDetails>().frameCount.text = "# of shots : " + newShot.frameCount;
                    CreateShotUIManager.Instance.New360CancelButton();
                    //To open shots panel after shot creation
                    CreateShotUIManager.Instance.ShotButton();
                }
            }
        }
    }
예제 #2
0
 //For 360 Shot
 public ShotDetails(string _productName, string _shotName, int _renderWidth, int _renderHeight, int _degrees, int _frameCount, Direction.RotationDirection _rotationDirection)
 {
     this.productName  = _productName;
     this.shotType     = ShotType.Animation;
     this.shotName     = _shotName;
     this.renderWidth  = _renderWidth;
     this.renderHeight = _renderHeight;
     this.frameCount   = _frameCount;
     this.degrees      = _degrees;
     this.direction    = _rotationDirection;
 }