/// <summary>
 /// Popup the file upload dialog UI.
 /// </summary>
 /// <returns><c>true</c>, if dialog was popuped, <c>false</c> otherwise.</returns>
 /// <param name="titleText">Title text.</param>
 /// <param name="uploadBtnText">Upload button text.</param>
 /// <param name="cancelBtnText">Cancel button text.</param>
 public static bool PopupDialog(string titleText = "", string uploadBtnText = "", string cancelBtnText = "")
 {
     #if UNITY_WEBGL && !UNITY_EDITOR
     if (Screen.fullScreen)
     {
         if (Unity_FileUploadManager_IsRunningOnEdgeBrowser())
         {
             Screen.fullScreen = false;
         }
         else
         {
             Unity_FileUploadManager_HideUnityScreenIfHtmlOverlayCant();
         }
     }
     bool success = WebGLFileUploadManager.Unity_FileUploadManager_PopupDialog(titleText, uploadBtnText, cancelBtnText);
     WebGLFileUploadManager.Unity_FileUploadManager_SetCallback(WebGLFileUploadManager.Callback);
     return(success);
     #else
     return(false);
     #endif
 }
示例#2
0
 public static void PopupDialog(string titleText = "", string uploadBtnText = "", string cancelBtnText = "")
 {
     #if UNITY_WEBGL && !UNITY_EDITOR
     if (IsInitialized)
     {
         Dispose();
     }
     if (Screen.fullScreen)
     {
         if (Unity_FileUploadManager_IsRunningOnEdgeBrowser())
         {
             Screen.fullScreen = false;
         }
         else
         {
             Unity_FileUploadManager_HideUnityScreenIfHtmlOverlayCant();
         }
     }
     WebGLFileUploadManager.Unity_FileUploadManager_SetCallback(WebGLFileUploadManager.Callback);
     WebGLFileUploadManager.Unity_FileUploadManager_PopupDialog(titleText, uploadBtnText, cancelBtnText);
     #endif
 }