protected bool Init() { try { #if UNITY_3_5 if (AVProWindowsMediaPlugin.Init(true)) #else if (AVProWindowsMediaPlugin.Init(false)) #endif { Debug.Log("[AVProWindowsMedia] version " + AVProWindowsMediaPlugin.GetPluginVersion().ToString("F2") + " initialised"); } else { Debug.LogError("[AVProWindowsMedia] failed to initialise."); this.enabled = false; Deinit(); return(false); } } catch (System.DllNotFoundException e) { Debug.Log("Unity couldn't find the DLL, did you move the 'Plugins' folder to the root of your project?"); throw e; } GetConversionMethod(); _isInitialised = true; return(_isInitialised); }
protected bool Init() { if (_isInitialised) { return(true); } try { if (AVProWindowsMediaPlugin.Init()) { if (UnityEngine.Application.isPlaying) { Debug.Log("[AVProWindowsMedia] version " + AVProWindowsMediaPlugin.GetPluginVersion().ToString("F2") + " initialised"); } } else { Debug.LogError("[AVProWindowsMedia] failed to initialise."); this.enabled = false; Deinit(); return(false); } } catch (System.DllNotFoundException e) { Debug.LogError("[AVProWindowsMedia] Unity couldn't find the DLL, did you move the 'Plugins' folder to the root of your project?"); throw e; } LoadShaders(); GetConversionMethod(); SetUnityFeatures(); // StartCoroutine("FinalRenderCapture"); _isInitialised = true; return(_isInitialised); }