static void TryCreateInstance()
 {
     if (instance == null)
     {
         instance = new FileDragAndDrop();
     }
 }
Exemple #2
0
 void OnPdf(List <string> files, Vector2 pos)
 {
     // scan through dropped files and filter out supported image types
     foreach (string f in files)
     {
         FileInfo fi   = new FileInfo(f);
         string   ext  = fi.Extension.ToLower();
         string   dest = fi.Name;
         if (ext == ".pdf")
         {
             FileDragAndDrop.RemoveAllListener();
             pdfAction(new Pdf(fi.FullName));
             debug.text = fi.FullName;
             break;
         }
     }
 }
Exemple #3
0
 void Start()
 {
     FileDragAndDrop.AddListener(OnPdf);
 }