Пример #1
0
 public NatCamAndroid()
 {
     using (var player = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) {
         var cacheDir = player
                        .GetStatic <AndroidJavaObject>("currentActivity")
                        .Call <AndroidJavaObject>("getCacheDir")
                        .Call <string>("toString");
         NatCamBridge.RegisterCoreCallbacks(onStart, onFrame, onPhoto, cacheDir);
     }
     natcam = new AndroidJavaObject("com.yusufolokoba.natcam.NatCam");
     Device = new NatCamDeviceAndroid();
     RenderDispatch.Initialize();
     DispatchUtility.onPause     += OnPause;
     OrientationUtility.onOrient += OnOrient;
     Debug.Log("NatCam: Initialized NatCam 2.0 Android backend");
 }
Пример #2
0
 public NatCorderAndroid() : base("com.yusufolokoba.natcorder.NatCorderDelegate")
 {
     natcorder = new AndroidJavaObject("com.yusufolokoba.natcorder.NatCorder", this, Application.persistentDataPath);
     RenderDispatch.Initialize();
     Debug.Log("NatCorder: Initialized NatCorder 1.3 Android backend");
 }
Пример #3
0
 public NatCorderiOS()
 {
     NatCorderBridge.Initialize(OnEncode, OnVideo, Application.persistentDataPath);
     RenderDispatch.Initialize();
     Debug.Log("NatCorder: Initialized NatCorder 1.2 iOS backend");
 }