示例#1
0
    // Start is called before the first frame update
    void Start()
    {
        //Get tracking files from wanted path
        vis = VisualizeJSON.Instance;
        DirectoryInfo info = new DirectoryInfo(path);

        FileInfo[] files = info.GetFiles();

        foreach (FileInfo f in files)
        {
            //If json file is found create file panel for it
            if (f.Extension == ".json")
            {
                GameObject           temp  = Instantiate(prefab, parent);
                Visualizer_FilePanel panel = temp.GetComponent <Visualizer_FilePanel>();
                panel.file        = f.FullName;
                panel.toggle.isOn = false;
                panelList.Add(panel);
            }
        }
    }
示例#2
0
 private void Awake()
 {
     Instance = this;
 }