Hi
I have a game where I got the code from the developer who can’t work on it anymore and I have upgraded to newer version of Unity, it was made in 2017.
I got it working in Unity but can’t build for Android. It gives me some warnings but I think the problem is this:
error: CS0103: The name ‘UniAndroidPermission’ does not exist in the current context.
I use Visual Studio 2017 on Windows 10.
and this is the code, what could be missing:
#if UNITY_ANDROID && !UNITY_EDITOR
if (!UniAndroidPermission.IsPermitted (AndroidPermission.CAMERA)) {
UniAndroidPermission.RequestPremission (AndroidPermission.CAMERA, () => {
StartCoroutine (“GoCam”);
}, () => {
StartCoroutine (“NoGoCam”);
});
}else
StartCoroutine (“GoCam”);
#else