void SaveConstructionScreenshot(ConstructionBuilder builder, Transform constructTarget) { builder.SetConstructionPivot(ConstructionBuilder.ConstructionPivot.MiddleCenter); Vector3 pos = constructTarget.position; Quaternion rot = constructTarget.rotation; constructTarget.Translate(100f, 0f, 0f); ScreenshotCamera screenshot = FindObjectOfType <ScreenshotCamera>(); Assert.IsNotNull <ScreenshotCamera>(screenshot, "Screenshot Camera should not be null"); screenshot.TakeScreenshot(_numUserConstructions - 1); constructTarget.position = pos; constructTarget.rotation = rot; }
// Update is called once per frame void Update() { //This will take time away from the start time _floatTimeRemain -= Time.deltaTime; if (_floatTimeRemain < 0) { //this sets the end time to true _endTime = true; } ConvertTime(); // Screenshot subsystem // Update the timer with the current delta time _screenshotTimer += Time.deltaTime; // If the timer is greater than the interval, take screenshot and reset timer if (_screenshotInt < _screenshotTimer) { _screenCam.TakeScreenshot(); _screenshotTimer = 0; } }