コード例 #1
0
 // This calls on the obj importer once the filebrowser recognises a file being clicked
 public void OpenFileButtonClick()
 {
     if (!string.IsNullOrEmpty(OpenFilePath) && FileBrowser.BrowserCallback != null)
     {
         FileBrowser.BrowserCallback(OpenFilePath);
     }
     objImporter.ImportModelAsync("MyObject", OpenFilePath, null, importOptions);
 }
コード例 #2
0
        /// <summary>
        /// Return selected file path if widow opened with <c>OpenFileBrowser(MonoBehavior)</c>
        /// and close browser window
        /// </summary>
        public void OpenFileButtonClick()
        {
            if (!string.IsNullOrEmpty(OpenFilePath) &&
                FileBrowser.BrowserCallback != null)
            {
                FileBrowser.BrowserCallback(OpenFilePath);
            }

            CloseFileBrowser();
        }