Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System.IO;
  5. using System;
  6.  
  7. public class PhotoPoserAuto : MonoBehaviour
  8. {
  9. public PhotoPoser PP;
  10. public bool activ;
  11. public GameObject leftUpPoint;
  12. public GameObject rightUpPoint;
  13. public static string foldeR;
  14. public static string[] directoryName;
  15. //0. Глобальный метод
  16. //1. Метод получения информации о стриминг ассетс
  17. //2. Метод расчета ширины поля и остатка ширины
  18. //3. Метод изменения размера фотографий
  19. //4. Метод распределяющий метод постановки объекта
  20. //5. Метод распределяющий метод равнения объекта
  21. //
  22.  
  23. public void AutoPosing()
  24. {
  25. GetInfo();
  26.  
  27. }
  28. public void GetInfo()
  29. {
  30. foldeR = System.IO.Path.GetDirectoryName(Application.streamingAssetsPath);
  31. foldeR = foldeR + "/Streaming Assets";
  32. Mass(foldeR);
  33.  
  34.  
  35.  
  36.  
  37. }
  38. public static void Mass(string fold)
  39. {
  40. try
  41. {
  42. string[] dirs = Directory.GetFiles(fold);
  43. foreach (string dir in dirs)
  44. {
  45. Debug.Log(dir);// Вывел только .metы, а папки не вывел
  46. }
  47. directoryName = dirs;
  48. }
  49. catch (Exception e)
  50. {
  51. //Debug.Log("The process failed: {0}", e.ToString());
  52. }
  53. }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement