Пример #1
0
		void Awake() {
			if(instance != null) {
				Destroy(this);
				return;
			}

			#if UNITY_ANDROID && ! UNITY_EDITOR
			AndroidJavaClass jc = new AndroidJavaClass("com.kayac.lobi.sdk.rec.unity.LobiRecUnity");
			CanCallNativeMethods = jc.CallStatic<bool>("loadNativeLibrary");
			if (CanCallNativeMethods) {
				new AndroidJavaClass("com.kayac.lobi.sdk.rec.externalaudio.ExternalAudioInput");
			}
			#elif (UNITY_IOS || UNITY_IPHONE) && ! UNITY_EDITOR
			CanCallNativeMethods = true;
			#endif

			if (CanCallNativeMethods) {
				DontDestroyOnLoad(this.gameObject);
				instance = this;
				if (initDelayFrames == 0) {
					InitLobiRec();
				}
				AutoRecord();
			} else {
				Debug.Log("disabled");
			}
		}
Пример #2
0
        void Awake()
        {
            if (instance != null)
            {
                Destroy(this);
                return;
            }

                        #if UNITY_ANDROID && !UNITY_EDITOR
            AndroidJavaClass jc = new AndroidJavaClass("com.kayac.lobi.sdk.rec.unity.LobiRecUnity");
            CanCallNativeMethods = jc.CallStatic <bool>("loadNativeLibrary");
            if (CanCallNativeMethods)
            {
                new AndroidJavaClass("com.kayac.lobi.sdk.rec.externalaudio.ExternalAudioInput");
            }
                        #elif (UNITY_IOS || UNITY_IPHONE) && !UNITY_EDITOR
            CanCallNativeMethods = true;
                        #endif

            if (CanCallNativeMethods)
            {
                DontDestroyOnLoad(this.gameObject);
                instance = this;
                if (initDelayFrames == 0)
                {
                    InitLobiRec();
                }
                AutoRecord();
            }
            else
            {
                Debug.Log("disabled");
            }
        }
 void OnPreRender()
 {
     LobiRec.CameraPreRender();
 }