Ejemplo n.º 1
0
    void Initialize()
    {
        if (Camera.main.gameObject.GetComponent <AudioListener>() == null)
        {
            Camera.main.gameObject.AddComponent <AudioListener>();

            if (Camera.main.transform.GetComponent <AudioListener>() != null)
            {
                DestroyImmediate(Camera.main.transform.GetComponent <AudioListener>());
            }
        }

                #if UNITY_IOS
        if (Camera.main.transform.GetComponent <iVidCapProAudio>() == null)
        {
            Camera.main.gameObject.AddComponent <iVidCapProAudio>();
        }


        vidCapManager           = this.GetComponent <iVidCapPro>();
        vidCapManager.saveAudio = Camera.main.GetComponent <iVidCapProAudio>();
                #endif

        MergeAndroidBridge.recordingStartState += StartSuccessHandle;
        isInitialized = true;
    }
Ejemplo n.º 2
0
    void Start()
    {
        Initialize();

                #if UNITY_IOS
        vidCapManager = this.GetComponent <iVidCapPro>();
        vidCapManager.RegisterSessionCompleteDelegate(HandleSessionCompleteDelegate);
                #endif
    }
Ejemplo n.º 3
0
    void Start()
    {
        Initialize();

                #if UNITY_IOS
        vidCapManager = this.GetComponent <iVidCapPro>();
        vidCapManager.RegisterSessionCompleteDelegate(HandleRecSaveComplete);

        vidCapManager.SetDebug(true);

        targetAspect.x = Mathf.Max(Screen.width, Screen.height);
        targetAspect.y = Mathf.Min(Screen.width, Screen.height);
                #endif
    }
Ejemplo n.º 4
0
    void Initialize()
    {
//		if (Camera.main.GetComponent<tw.com.championtek.VirtualCamera>() == null)
//		{
//			Camera.main.gameObject.AddComponent<tw.com.championtek.VirtualCamera>();
//		}
//
        //Note: You must add this to the recording manager!
                #if UNITY_IOS
        vidCapManager = this.GetComponent <iVidCapPro>();


        if (Camera.main.GetComponent <Blitter>() == null)
        {
            Camera.main.gameObject.AddComponent <Blitter>();
        }


        if (Camera.main.gameObject.GetComponent <AudioListener>() == null)
        {
            Camera.main.gameObject.AddComponent <AudioListener>();

            if (Camera.main.transform.parent.GetComponent <AudioListener>() != null)
            {
                //remove vuforia's listener in favor of somewhere we expect it...
                //we can only use one audio listener, and we want to make sure it is with the iVidCapProAudio guy as he is the one handling recording audio through it.
                DestroyImmediate(Camera.main.transform.parent.GetComponent <AudioListener>());
            }
        }

        if (Camera.main.transform.parent.GetComponent <iVidCapProAudio>() == null)
        {
            Camera.main.gameObject.AddComponent <iVidCapProAudio>();
        }

        vidCapManager.saveAudio = Camera.main.GetComponent <iVidCapProAudio>();
//		vidCapManager.SetDebug(true);
                #endif

//		#if UNITY_ANDROID
//		androidRecordingCamera = Camera.main.GetComponent<tw.com.championtek.VirtualCamera>();
//		#endif
    }