/// <summary> /// Raises the disable event. /// </summary> void OnDestroy() { WebGLFileUploadManager.FileUploadEventHandler -= fileUploadHandler; WebGLFileUploadManager.Dispose(); capture.release(); if (rgbMat != null) { rgbMat.Dispose(); } if (grayMat != null) { grayMat.Dispose(); } if (rectangleTracker != null) { rectangleTracker.Dispose(); } if (faceLandmarkDetector != null) { faceLandmarkDetector.Dispose(); } if (frontalFaceParam != null) { frontalFaceParam.Dispose(); } }
/// <summary> /// Raises the disable event. /// </summary> void OnDisable() { WebGLFileUploadManager.FileUploadEventHandler -= fileUploadHandler; WebGLFileUploadManager.Dispose(); webCamTextureToMatHelper.Dispose(); if (cascade != null) { cascade.Dispose(); } if (rectangleTracker != null) { rectangleTracker.Dispose(); } if (faceLandmarkDetector != null) { faceLandmarkDetector.Dispose(); } if (frontalFaceParam != null) { frontalFaceParam.Dispose(); } }
// Start is called before the first frame update void Start() { Debug.Log("WebGLFileUploadManager.getOS: " + WebGLFileUploadManager.getOS); Debug.Log("WebGLFileUploadManager.isMOBILE: " + WebGLFileUploadManager.IsMOBILE); Debug.Log("WebGLFileUploadManager.getUserAgent: " + WebGLFileUploadManager.GetUserAgent); WebGLFileUploadManager.SetDebug(true); WebGLFileUploadManager.Show(false); WebGLFileUploadManager.SetDescription("Select netcdf files (.nc)"); WebGLFileUploadManager.SetImageEncodeSetting(true); WebGLFileUploadManager.SetAllowedFileName("\\.(nc)$"); WebGLFileUploadManager.onFileUploaded += OnFileUploaded; }
// Use this for initialization void Start() { WebGLFileUploadManager.SetDebug(true); if ( #if UNITY_WEBGL && !UNITY_EDITOR WebGLFileUploadManager.IsMOBILE #else Application.isMobilePlatform #endif ) { WebGLFileUploadManager.Show(false); WebGLFileUploadManager.SetDescription("Select image files (.png|.jpg|.gif)"); }
/// <summary> /// Raises the destroy event. /// </summary> void OnDestroy() { WebGLFileUploadManager.FileUploadEventHandler -= fileUploadHandler; WebGLFileUploadManager.Dispose(); if (faceLandmarkDetector != null) { faceLandmarkDetector.Dispose(); } if (cascade != null) { cascade.Dispose(); } }
// Use this for initialization void Start() { WebGLFileUploadManager.SetImageEncodeSetting(true); WebGLFileUploadManager.SetAllowedFileName("\\.(png|jpe?g|gif)$"); WebGLFileUploadManager.SetImageShrinkingSize(640, 480); WebGLFileUploadManager.FileUploadEventHandler += fileUploadHandler; #if UNITY_WEBGL && !UNITY_EDITOR StartCoroutine(getFilePathCoroutine()); #else haarcascade_frontalface_alt_xml_filepath = OpenCVForUnity.Utils.getFilePath("haarcascade_frontalface_alt.xml"); shape_predictor_68_face_landmarks_dat_filepath = DlibFaceLandmarkDetector.Utils.getFilePath("shape_predictor_68_face_landmarks.dat"); Run(); #endif }
// Use this for initialization void Start() { Debug.Log("WebGLFileUploadManager.getOS: " + WebGLFileUploadManager.getOS); Debug.Log("WebGLFileUploadManager.isMOBILE: " + WebGLFileUploadManager.IsMOBILE); Debug.Log("WebGLFileUploadManager.getUserAgent: " + WebGLFileUploadManager.GetUserAgent); WebGLFileUploadManager.SetDebug(true); if ( #if UNITY_WEBGL && !UNITY_EDITOR WebGLFileUploadManager.IsMOBILE #else Application.isMobilePlatform #endif ) { WebGLFileUploadManager.Show(false); WebGLFileUploadManager.SetDescription("Select image files (.png|.jpg|.gif)"); }
/// <summary> /// Raises the upload image button event. /// </summary> public void OnUploadImageButton() { WebGLFileUploadManager.PopupDialog(null, "Select image file (.png|.jpg|.gif)"); }
/// <summary> /// Raises the upload face mask button event. /// </summary> public void OnUploadFaceMaskButton() { WebGLFileUploadManager.PopupDialog(null, "Select frontal face image file (.png|.jpg|.gif)"); }
public void OnUpload() { WebGLFileUploadManager.PopupDialog(null, "Select netcdf files (.nc)"); }