/** OpenFileDialog */ public static void OpenFileDialog(Root_MonoBehaviour a_root_monobehaviour, string a_title, string a_extension) { a_root_monobehaviour.openfiledialog_result = null; UnityEngine.AndroidJavaClass t_class_openfiledialog = new UnityEngine.AndroidJavaClass("fee.platform.Android_OpenFileDialogActivity"); t_class_openfiledialog.CallStatic("Open", a_title, a_extension); }
/** OpenUrl */ public static void OpenUrl(Root_MonoBehaviour a_root_monobehaviour, string a_url_string) { try{ WebGL_OpenUrl.Fee_Platform_WebGLPlugin_OpenUrl(a_url_string); }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); } }
/** OpenPrompt */ public static string OpenPrompt(Root_MonoBehaviour a_root_monobehaviour, string a_title, string a_text) { try{ return(WebGL_OpenPrompt.Fee_Platform_WebGLPlugin_OpenPrompt(a_title, a_text)); }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); return(null); } }
/** OpenFileDialog */ public static void OpenFileDialog(Root_MonoBehaviour a_root_monobehaviour, string a_title, string a_extension) { //a_root_monobehaviour.openfiledialog_result = null; try{ WebGL_OpenFileDialog.Fee_Platform_WebGLPlugin_OpenFileDialog_Open(a_title, a_extension); }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); //a_root_monobehaviour.openfiledialog_result = ""; } }
/** OpenFileDialog */ public static void OpenFileDialog(Root_MonoBehaviour a_root_monobehaviour, string a_title, string a_extension) { a_root_monobehaviour.openfiledialog_result = null; try{ a_root_monobehaviour.openfiledialog_result = UnityEditor.EditorUtility.OpenFilePanel(a_title, UnityEngine.Application.streamingAssetsPath, a_extension); }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); a_root_monobehaviour.openfiledialog_result = ""; } }
/** OpenFileDialog */ public static void OpenFileDialog(Root_MonoBehaviour a_root_monobehaviour, string a_title, string a_extension) { a_root_monobehaviour.openfiledialog_result = null; try{ a_root_monobehaviour.openfiledialog_result = FeeCsDll.OpenFileDialog_Comdlg32.Open(a_title, a_extension); }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); a_root_monobehaviour.openfiledialog_result = ""; } }
/** SyncFs */ public static void SyncFs(Root_MonoBehaviour a_root_monobehaviour) { try{ bool t_ret = WebGL_SyncFs.Fee_Platform_WebGLPlugin_SyncFs(); if (t_ret == false) { Tool.LogError("Fee_Platform_WebGLPlugin_SyncFs", "error"); } }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); } }
/** [シングルトン]constructor */ private Platform() { this.root_gameobject = new UnityEngine.GameObject(); this.root_gameobject.name = "Platform"; UnityEngine.GameObject.DontDestroyOnLoad(this.root_gameobject); this.root_monobehaviour = this.root_gameobject.AddComponent <Root_MonoBehaviour>(); #if ((!UNITY_EDITOR) && (UNITY_WEBGL)) { WebGL_OpenFileDialog.Register(); } #endif }
/** キャンセル。 */ public static void Cancel(Root_MonoBehaviour a_root_monobehaviour) { if (a_root_monobehaviour.loadandroidcontentfile != null) { try{ using (UnityEngine.AndroidJavaClass t_class_loadcontentfile = new UnityEngine.AndroidJavaClass("fee.platform.Android_LoadAndroidContentFile_AsyncObject")){ t_class_loadcontentfile.CallStatic("Cancel", a_root_monobehaviour.loadandroidcontentfile); } }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); } } }
/** GetThreadStatus。 */ public static int GetThreadStatus(Root_MonoBehaviour a_root_monobehaviour) { int t_ret = -1; if (a_root_monobehaviour.loadandroidcontentfile != null) { try{ using (UnityEngine.AndroidJavaClass t_class_loadcontentfile = new UnityEngine.AndroidJavaClass("fee.platform.Android_LoadAndroidContentFile_AsyncObject")){ t_ret = t_class_loadcontentfile.CallStatic <int>("GetThreadStatus", a_root_monobehaviour.loadandroidcontentfile); } }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); } } return(t_ret); }
/** IsComplate。 */ public static bool IsComplate(Root_MonoBehaviour a_root_monobehaviour) { bool t_ret = false; if (a_root_monobehaviour.loadandroidcontentfile != null) { try{ using (UnityEngine.AndroidJavaClass t_class_loadcontentfile = new UnityEngine.AndroidJavaClass("fee.platform.Android_LoadAndroidContentFile_AsyncObject")){ t_ret = t_class_loadcontentfile.CallStatic <bool>("IsComplate", a_root_monobehaviour.loadandroidcontentfile); } }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); t_ret = false; } } return(t_ret); }
/** 開始。 */ public static bool Start(Root_MonoBehaviour a_root_monobehaviour, Fee.File.Path a_path) { if (a_root_monobehaviour.loadandroidcontentfile == null) { UnityEngine.AndroidJavaObject t_async_object = null; try{ using (UnityEngine.AndroidJavaClass t_class_loadcontentfile = new UnityEngine.AndroidJavaClass("fee.platform.Android_LoadAndroidContentFile_AsyncObject")){ t_async_object = t_class_loadcontentfile.CallStatic <UnityEngine.AndroidJavaObject>("Start", a_path.GetPath()); } }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); } if (t_async_object != null) { a_root_monobehaviour.loadandroidcontentfile = t_async_object; return(true); } } return(false); }
/** GetResult。 */ public static byte[] GetResult(Root_MonoBehaviour a_root_monobehaviour) { byte[] t_ret = null; if (a_root_monobehaviour.loadandroidcontentfile != null) { try{ using (UnityEngine.AndroidJavaClass t_class_loadcontentfile = new UnityEngine.AndroidJavaClass("fee.platform.Android_LoadAndroidContentFile_AsyncObject")){ using (UnityEngine.AndroidJavaObject t_array_object = t_class_loadcontentfile.CallStatic <UnityEngine.AndroidJavaObject>("GetResult", a_root_monobehaviour.loadandroidcontentfile)){ if (t_array_object != null) { System.IntPtr t_array_object_pointer = t_array_object.GetRawObject(); t_ret = UnityEngine.AndroidJNIHelper.ConvertFromJNIArray <byte[]>(t_array_object_pointer); } } } }catch (System.Exception t_exception) { Tool.DebugReThrow(t_exception); t_ret = null; } } return(t_ret); }