private void Awake() { instance = this; msgids = new ushort[] { (ushort )UIEvent.ShowVideoPlay, (ushort )UIEvent.HideVideoPlay }; RegistSelf(this, msgids); }
void Start() { vpManager = this.GetComponent <VideoPlayerManager>(); for (int i = 0; i < ViewMax; i++) { MInfo[i] = GameObject.Find(MovieInfoString[i]).GetComponent <Text>(); } // Instruction = GameObject.Find("Instruction").GetComponent<Text>(); // ダイアログを表示するときまで、 Canvas を無効にしておく。 if (Canvas_ErrorDialog != null) { Canvas_ErrorDialog.enabled = false; } }
void Start() { vpManager = GameObject.Find("VideoPlayerManager").GetComponent <VideoPlayerManager>(); while (true) { ViewCount = vpManager.getViewCount(); if (ViewCount != 0) { break; } } for (int i = 0; i < ViewCount; i++) { Vp[i] = GameObject.Find(MoviePanelString[i]).GetComponent <VideoPlayer>(); } }
// Use this for initialization void Start() { vpManager = GameObject.Find("VideoPlayerManager").GetComponent <VideoPlayerManager>(); while (true) { ViewCount = vpManager.getViewCount(); if (ViewCount != 0) { break; } } SdAll = GameObject.Find("Slider").GetComponent <Slider>(); for (int i = 0; i < ViewCount; i++) { Sd[i] = GameObject.Find(SliderString[i]).GetComponent <Slider>(); } }
/// <summary> /// Awake /// </summary> private void Awake() { instance = this; //QualityManager.SetLevel("high");//TODO //视频组件在模拟器上面不进行播放 if (CheckPlayVideo()) { //if (GLog.IsLogInfoEnabled) GLog.LogInfo("VideoPlayerManager Awake 最低不是最低处理机型 [" + QualityManager.GetLevel() + " ] [ " + MinimumAdaptation + " ]"); if (targetRawImage != null && targetRawImage.gameObject != null) { targetRawImage.gameObject.SetActive(false); } _isInit = false; return; } if (IsInitType == InitType.Awake) { Init(); } }
// Use this for initialization void Start() { vpManager = GameObject.Find("VideoPlayerManager").GetComponent <VideoPlayerManager>(); while (true) { ViewCount = vpManager.getViewCount(); if (ViewCount != 0) { break; } } date = vpManager.getMovieStartDate(0) + " "; SdAll = GameObject.Find("Slider").GetComponent <Slider>(); DTimeAll = GameObject.Find("TimesOfDay").GetComponent <Text>(); ETimeAll = GameObject.Find("ElapsedTime").GetComponent <Text>(); for (int i = 0; i < ViewCount; i++) { Sd[i] = GameObject.Find(SliderString[i]).GetComponent <Slider>(); FName[i] = GameObject.Find(FNameString[i]).GetComponent <Text>(); DTime[i] = GameObject.Find(DTimeString[i]).GetComponent <Text>(); ETime[i] = GameObject.Find(ETimeString[i]).GetComponent <Text>(); if (vpManager.getAudioSupport(i)) { FName[i].text = vpManager.getMovieName(i); } else { FName[i].text = vpManager.getMovieName(i) + " (Audio codec not supported)"; FName[i].color = new Color(255f / 255f, 0f / 255f, 0f / 255f); } } }
/// <summary> /// 销毁相关组件 /// </summary> private void OnDestroy() { if (targetRawImage != null) { targetRawImage.texture = null; } if (videoPlayer != null) { videoPlayer.targetTexture = null; } if (_targetRenderTexture != null) { RenderTexture.ReleaseTemporary(_targetRenderTexture); } _targetRenderTexture = null; videoPlayer = null; targetRawImage = null; PrepareCompletedDelegate = null; ErrorReceivedDelegate = null; LoopEndDelegate = null; _isInit = false; instance = null; }
// Use this for initialization void Start() { vpManager = GameObject.Find("VideoPlayerManager").GetComponent <VideoPlayerManager>(); while (true) { ViewLayout = vpManager.getViewLayout(); if (ViewLayout != 0) { break; } } for (int i = 0; i < ViewLayout; i++) { Cam[i] = GameObject.Find(CameraString[i]).GetComponent <Camera>(); Sd[i] = GameObject.Find(SliderString[i]).GetComponent <Slider>(); FName[i] = GameObject.Find(FNameString[i]).GetComponent <Text>(); DTime[i] = GameObject.Find(DTimeString[i]).GetComponent <Text>(); ETime[i] = GameObject.Find(ETimeString[i]).GetComponent <Text>(); Vp[i] = GameObject.Find(MoviePanelString[i]).GetComponent <VideoPlayer>(); } }
// Use this for initialization private void Start() { playButton.SetActive(true); pauseButton.SetActive(false); vidController = gameObject.GetComponent <VideoPlayerManager>(); }
void Awake() { _instance = this; }
private void Start() { rt = GetComponent <RectTransform>(); videoPlayerManager = GameObject.Find("VideoPlayerManager").GetComponent <VideoPlayerManager>(); }