public void Setup() { _tesseract = new MyTesseractWrapper(); string datapath = Application.streamingAssetsPath + "/tessdata/"; if (_tesseract.Init("eng", datapath)) { Debug.Log("Init Successful"); } }
public void OcrSetup(UnityAction onSetupComplete) { _tesseract = new MyTesseractWrapper(); #if UNITY_EDITOR string datapath = Path.Combine(Application.streamingAssetsPath, "tessdata"); #elif UNITY_ANDROID string datapath = Application.persistentDataPath + "/tessdata/"; #else string datapath = Path.Combine(Application.streamingAssetsPath, "tessdata"); #endif if (_tesseract.Init("eng", datapath)) { Debug.Log("Init Successful"); onSetupComplete?.Invoke(); } else { Debug.LogError(_tesseract.GetErrorMessage()); } }