Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class CreatePanorama : MonoBehaviour {
  5. public string captureName;
  6.  
  7. private float stepSize = 20;
  8.  
  9. // Use this for initialization
  10. IEnumerator Start () {
  11. int counter = 0;
  12. for (float y = -90; y <= 90; y+=stepSize) {
  13. for (float x = 0; x <= 360; x+=stepSize) {
  14. transform.localEulerAngles = new Vector3(y, x, 0.0f);
  15. Application.CaptureScreenshot("screenshots/"+captureName + "/screenshot-" + counter++ + "-" + x + "-" + y + ".png", 1);
  16. yield return new WaitForSeconds(0.05f);
  17. }
  18. }
  19. }
  20.  
  21. // Update is called once per frame
  22. void Update () {
  23.  
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement