Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class CreatePanorama : MonoBehaviour {
- public string captureName;
- private float stepSize = 20;
- // Use this for initialization
- IEnumerator Start () {
- int counter = 0;
- for (float y = -90; y <= 90; y+=stepSize) {
- for (float x = 0; x <= 360; x+=stepSize) {
- transform.localEulerAngles = new Vector3(y, x, 0.0f);
- Application.CaptureScreenshot("screenshots/"+captureName + "/screenshot-" + counter++ + "-" + x + "-" + y + ".png", 1);
- yield return new WaitForSeconds(0.05f);
- }
- }
- }
- // Update is called once per frame
- void Update () {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement