This commit is contained in:
2020-07-18 21:12:14 +08:00
parent 1361db18a9
commit 33dc6cea60
214 changed files with 16596 additions and 3104 deletions

View File

@@ -0,0 +1,29 @@
#if !UNITY_EDITOR && UNITY_ANDROID
using System.Threading;
using UnityEngine;
namespace NativeCameraNamespace
{
public class NCPermissionCallbackAndroid : AndroidJavaProxy
{
private object threadLock;
public int Result { get; private set; }
public NCPermissionCallbackAndroid( object threadLock ) : base( "com.yasirkula.unity.NativeCameraPermissionReceiver" )
{
Result = -1;
this.threadLock = threadLock;
}
public void OnPermissionResult( int result )
{
Result = result;
lock( threadLock )
{
Monitor.Pulse( threadLock );
}
}
}
}
#endif