private async Task InitFreetype(System.Net.DownloadProgressChangedEventHandler onDownloadProgressChanged = null) { if (_freetype == null) { _freetype = new FreetypeNotoSansCJK(_modelFolderName); await _freetype.Init(onDownloadProgressChanged); } }
private async Task InitFreetype(System.Net.DownloadProgressChangedEventHandler onDownloadProgressChanged = null) #endif { if (_freetype == null) { _freetype = new FreetypeNotoSansCJK(_modelFolderName); #if UNITY_EDITOR || UNITY_IOS || UNITY_ANDROID || UNITY_STANDALONE || UNITY_WEBGL yield return(_freetype.Init(onDownloadProgressChanged)); #else await _freetype.Init(onDownloadProgressChanged); #endif } }
/// <summary> /// Release the memory associated with this scene text detector. /// </summary> protected override void DisposeObject() { if (_textDetector != null) { _textDetector.Dispose(); _textDetector = null; } if (_ocr != null) { _ocr.Dispose(); _ocr = null; } if (_freetype != null) { _freetype.Dispose(); _freetype = null; } }
/// <summary> /// Clear and reset the model. Required Init function to be called again before calling ProcessAndRender. /// </summary> public void Clear() { if (_textDetector != null) { _textDetector.Dispose(); _textDetector = null; } if (_ocr != null) { _ocr.Dispose(); _ocr = null; } if (_freetype != null) { _freetype.Dispose(); _freetype = null; } }