//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(); } } } }
public void TakeScreenshot() { if (CheckFolderIsCreated.ScreenShotFolderCreation(ProductHandlerManager.Instance.product.name)) { // Debug.Log("File is created"); StartCoroutine("CaptureIt"); } }
//To create silo shot public void CreateSilo() { if (!CheckSiloInputFeildIsNull()) { if (IsNameOfShot(loadListOfShotDetails, CaptureTemplateUI.Instance.nameOfSiloShot.text)) { ShotDetails newShot = new ShotDetails(ProductHandlerManager.Instance.product.name, CaptureTemplateUI.Instance.nameOfSiloShot.text, int.Parse(CaptureTemplateUI.Instance.widthSilo.text), int.Parse(CaptureTemplateUI.Instance.heightSilo.text)); 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); CreateShotUIManager.Instance.SiloCancelButton(); //To open shots panel after shot creation CreateShotUIManager.Instance.ShotButton(); } } } }