Advertisement
Guest User

Untitled

a guest
Oct 7th, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. public void PrintButton(MagazineResourcesManager mrm)
  2. {
  3. var url = mrm.ReturnPDFUrl ();
  4. if (url.Equals (""))
  5. Debug.Log ("No se ha especificado la URL del pdf a imprimir");
  6. else
  7. Application.OpenURL(url); //URL DEL VIDEO
  8. }
  9. public void ToggleVideoPages(MagazineResourcesManager mrm)
  10. {
  11. int children = thumb.gameObject.transform.childCount;
  12.  
  13.  
  14. List<GameObject> videopages = mrm.ReturnVideoPages ();
  15. if (!_onlyvid) {
  16. //Desactivamos todos
  17. for (int i = 0; i < children; i++)
  18. {
  19. thumb.gameObject.transform.GetChild(i).gameObject.SetActive(false);
  20. }
  21. //Activamos los que tengamos el indice
  22. for(int vid = 0; vid < videopages.Count; vid++)
  23. {
  24. int index = int.Parse(videopages[vid].name.Substring(4));
  25. thumb.gameObject.transform.GetChild(index).gameObject.SetActive(true);
  26.  
  27. }
  28.  
  29.  
  30. _onlyvid = true;
  31. videoImg.color = _on;
  32. // Mostrar solo las paginas con videos
  33.  
  34. } else {
  35. for (int i = 0; i < children; i++)
  36. {
  37. thumb.gameObject.transform.GetChild(i).gameObject.SetActive(true);
  38. }
  39. _onlyvid = false;
  40. videoImg.color = _off;
  41.  
  42. //Mostrar todas las paginas
  43.  
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement