Quantcast
Channel: Questions in topic: "xcode"
Viewing all articles
Browse latest Browse all 1047

NotSupportedException: Specified method is not supported on Xcode when using Coroutines

$
0
0
void Awake() { StartCamera(); } public void StartCamera() { Debug.Log("Start Open"); // Create a basic scanner StartCoroutine(SetPermision()); } IEnumerator SetPermision() { Debug.Log("Request Camera Open"); Debug.Log("Camera Open"); yield return Application.RequestUserAuthorization(UserAuthorization.WebCam); if (Application.HasUserAuthorization(UserAuthorization.WebCam)) { BarcodeScanner = new Scanner(); BarcodeScanner.Camera.Play(); // Display the camera texture through a RawImage BarcodeScanner.OnReady += (sender, arg) => { // Set Orientation & Texture Image.transform.localEulerAngles = BarcodeScanner.Camera.GetEulerAngles(); Image.transform.localScale = BarcodeScanner.Camera.GetScale(); Image.texture = BarcodeScanner.Camera.Texture; // Keep Image Aspect Ratio var rect = Image.GetComponent(); var newHeight = rect.sizeDelta.x * BarcodeScanner.Camera.Height / BarcodeScanner.Camera.Width; rect.sizeDelta = new Vector2(rect.sizeDelta.x, newHeight); RestartTime = Time.realtimeSinceStartup; }; } } Getting this error while running above lines on iOS, Works great on android and editor. PLease help I m on 2019.3, xcode version 11.5 Start Open ContinuousDemo:StartCamera() ContinuousDemo:Awake() (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35) Uploading Crash Report NotSupportedException: Specified method is not supported. at ContinuousDemo+d__45.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0 at ContinuousDemo.Awake () [0x00000] in <00000000000000000000000000000000>:0 ContinuousDemo:Awake()

Viewing all articles
Browse latest Browse all 1047

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>