public void Awake() { videoSamples = new GameObject[6]; videoSamples[0] = Video0; videoSamples[1] = Video1; videoSamples[2] = Video2; videoSamples[3] = Video3; videoSamples[4] = Video4; videoSamples[5] = Video5; string NATIVE_LIBS_MISSING_MESSAGE = "Video Support libraries not found or could not be loaded!\n" + "Please add the <b>GVRVideoPlayer.unitypackage</b>\n to this project"; if (missingLibText != null) { try { IntPtr ptr = GvrVideoPlayerTexture.CreateVideoPlayer(); if (ptr != IntPtr.Zero) { GvrVideoPlayerTexture.DestroyVideoPlayer(ptr); missingLibText.enabled = false; } else { missingLibText.text = NATIVE_LIBS_MISSING_MESSAGE; missingLibText.enabled = true; } } catch (Exception e) { Debug.LogError(e); missingLibText.text = NATIVE_LIBS_MISSING_MESSAGE; missingLibText.enabled = true; } } }
public void Awake() { videoSamples = new GameObject[3]; videoSamples[0] = localVideoSample; videoSamples[1] = dashVideoSample; videoSamples[2] = panoVideoSample; if (missingLibText != null) { try { IntPtr ptr = GvrVideoPlayerTexture.CreateVideoPlayer(); if (ptr != IntPtr.Zero) { GvrVideoPlayerTexture.DestroyVideoPlayer(ptr); missingLibText.enabled = false; } else { missingLibText.enabled = true; } } catch (Exception e) { Debug.LogError(e); missingLibText.enabled = true; } } missingLibText.text = "Game Over!\nScore: " + ScoreManager.score; ScoreManager.score = 0; }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } string NATIVE_LIBS_MISSING_MESSAGE = "Video Support libraries not found or could not be loaded!\n" + "Please add the <b>GVRVideoPlayer.unitypackage</b>\n to this project"; try { IntPtr ptr = GvrVideoPlayerTexture.CreateVideoPlayer(); if (ptr != IntPtr.Zero) { GvrVideoPlayerTexture.DestroyVideoPlayer(ptr); } else { Debug.LogError(NATIVE_LIBS_MISSING_MESSAGE); } } catch (Exception e) { Debug.LogError(e); Debug.LogError(NATIVE_LIBS_MISSING_MESSAGE); } }
public void Awake() { videoSamples = new GameObject[3]; videoSamples[0] = localVideoSample; videoSamples[1] = dashVideoSample; videoSamples[2] = panoVideoSample; string NATIVE_LIBS_MISSING_MESSAGE = "Ambientes de teste para claustrofobia, escolha um dos ambientes deixando o ponto em cima por 5seg"; if (missingLibText != null) { try { IntPtr ptr = GvrVideoPlayerTexture.CreateVideoPlayer(); if (ptr != IntPtr.Zero) { GvrVideoPlayerTexture.DestroyVideoPlayer(ptr); missingLibText.enabled = false; } else { missingLibText.text = NATIVE_LIBS_MISSING_MESSAGE; missingLibText.enabled = true; } } catch (Exception e) { Debug.LogError(e); missingLibText.text = NATIVE_LIBS_MISSING_MESSAGE; missingLibText.enabled = true; } } }
public void Awake() { if (panoVideo == null) { Debug.LogError("Video should be pano video..."); return; } try { IntPtr ptr = GvrVideoPlayerTexture.CreateVideoPlayer(); if (ptr != IntPtr.Zero) { GvrVideoPlayerTexture.DestroyVideoPlayer(ptr); } } catch (Exception e) { Debug.LogError(e); } }