diff --git a/BibliothequeTexture/Bibliotheque.cs b/BibliothequeTexture/Bibliotheque.cs new file mode 100644 index 0000000..2c0a799 --- /dev/null +++ b/BibliothequeTexture/Bibliotheque.cs @@ -0,0 +1,116 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +public class Bibliotheque : MonoBehaviour { + + public GameObject scrollview; + public string pathToMaterials; + private Component contentElement; + + // Use this for initialization + void Start () { + //Recherche de l'endroit où placer les elements sur l'UI + foreach (Component go in this.GetComponentsInChildren()) { + if (go.name == "Content") { + this.contentElement = go; + break; + } + } + + //Get l'arboressance du dossier + FileTree mainTree = new FileTree (pathToMaterials.TrimStart(pathToMaterials.ToCharArray()), pathToMaterials); + List listTexturePath = mainTree.getPaths(); + for(int i = 0; i ().textureFolderPath = pathToMaterials; + //Creation du clickable + textElem.gameObject.AddComponent(typeof(Button)); + textElem.GetComponent