|
static string | getVersion () |
|
static string | getFilePath (string filepath, bool refresh=false) |
|
static IEnumerator | getFilePathAsync (string filepath, Action< string > completed, Action< string, float > progress=null, bool refresh=false) |
|
static void | setDebugMode (bool debugMode, bool throwException=false) |
|
static string DlibFaceLandmarkDetector.Utils.getFilePath |
( |
string |
filepath, |
|
|
bool |
refresh = false |
|
) |
| |
|
static |
Gets the readable path of a file in the "StreamingAssets" folder.
Set a relative file path from the starting point of the "StreamingAssets" folder. e.g. "foobar.txt" or "hogehoge/foobar.txt".
[Android]The target file that exists in the "StreamingAssets" folder is copied into the folder of the Application.persistentDataPath. If refresh flag is false, when the file has already been copied, the file is not copied. If refresh flag is true, the file is always copyied.
[WebGL]If the target file has not yet been copied to WebGL's virtual filesystem, you need to use getFilePathAsync() at first.
- Parameters
-
filepath | a relative file path starting from "StreamingAssets" folder |
refresh | [Android]If refresh flag is false, when the file has already been copied, the file is not copied. If refresh flag is true, the file is always copyied. |
- Returns
- returns the file path in case of success and returns empty in case of error.
static IEnumerator DlibFaceLandmarkDetector.Utils.getFilePathAsync |
( |
string |
filepath, |
|
|
Action< string > |
completed, |
|
|
Action< string, float > |
progress = null , |
|
|
bool |
refresh = false |
|
) |
| |
|
static |
Gets the readable path of a file in the "StreamingAssets" folder by using coroutines.
Set a relative file path from the starting point of the "StreamingAssets" folder. e.g. "foobar.txt" or "hogehoge/foobar.txt".
[Android]The target file that exists in the "StreamingAssets" folder is copied into the folder of the Application.persistentDataPath. If refresh flag is false, when the file has already been copied, the file is not copied. If refresh flag is true, the file is always copyied.
[WebGL]The target file in the "StreamingAssets" folder is copied to the WebGL's virtual filesystem. If refresh flag is false, when the file has already been copied, the file is not copied. If refresh flag is true, the file is always copyied.
- Parameters
-
filepath | a relative file path starting from "StreamingAssets" folder |
completed | a callback function that is called when process is completed. Returns the file path in case of success and returns empty in case of error. |
progress | a callback function that is called when process is progress. Returns the file path and a value of 0 to 1. |
refresh | [Android][WebGL]If refresh flag is false, when the file has already been copied, the file is not copied. If refresh flag is true, the file is always copyied. |
static string DlibFaceLandmarkDetector.Utils.getVersion |
( |
| ) |
|
|
static |
Returns this "Dlib FaceLandmark Detector" version number.
- Returns
- this "Dlib FaceLandmark Detector" version number
static void DlibFaceLandmarkDetector.Utils.setDebugMode |
( |
bool |
debugMode, |
|
|
bool |
throwException = false |
|
) |
| |
|
static |
Sets the debug mode.
if debugMode is true, The error log of the Native side OpenCV will be displayed on the Unity Editor Console.However, if throwException is true, CvException is thrown instead of calling Debug.LogError (msg).
Please use as follows.
Utils.setDebugMode(true);
aaa
bbb
ccc
Utils.setDebugMode(false);
- Parameters
-
debugMode | if true, The error log of the Native side OpenCV will be displayed on the Unity Editor Console |
throwException | if true, CvException is thrown instead of calling Debug.LogError (msg). |
The documentation for this class was generated from the following file:
- Assets/DlibFaceLandmarkDetector/Scripts/Utils.cs