// Update is called once per frame void Update() { if (loadFlag) { absoluteTime += Time.deltaTime; if (absoluteTime >= 0.5f) { loadFlag = false; // 리소스 로드 //Global.loadResource(); // XML, JAM 로드 XML_LoadJudgeData(); XML_LoadSelectedMusic(); // 오디오, 배경 비디오 파일 로드 RSC.LoadAudio(Global.songPath + "/" + Global.mp3Path + "/" + Global.musicInfo[Global.currentSelectMusic].mp3Name); RSC.LoadVideoCache(Global.musicInfo[Global.currentSelectMusic].bgaName); // 인게임 설정 로드 loadIngameSetting(); // 씬 전환 SceneManager.LoadScene("InGame"); } } }
void load() { // 리소스 로드 //Global.loadResource(); // XML, JAM 로드 XML_LoadJudgeData(); XML_LoadSelectedMusic(); // 오디오, 배경 비디오 파일 로드 RSC.LoadAudio(Global.songPath + "/" + Global.mp3Path + "/" + Global.musicInfo[Global.currentSelectMusic].mp3Name); RSC.LoadVideoCache(Global.musicInfo[Global.currentSelectMusic].bgaName); // 인게임 설정 로드 loadIngameSetting(); // 씬 전환 SceneManager.LoadScene("InGame"); }
// Use this for initialization void Start() { // 백그라운드 영상 로드 if (Global.titleFlag) { Global.titleFlag = false; for (int i = 0; i < Global.modeVideoName.Length; ++i) { RSC.LoadVideoCache(Global.modeVideoName[i]); } } MediaPlayerCtrl videoCache; for (int i = 0; i < Global.modeVideoName.Length; ++i) { GameObject tmpGO = RSC.GetVideo(Global.modeVideoName[i]) as GameObject; if (tmpGO == null) { Debug.Log("Object not Found"); return; } videoCache = tmpGO.GetComponent <MediaPlayerCtrl>(); if (videoCache != null) { videoCache.m_bLoop = true; videoCache.m_bFullScreen = true; videoCache.m_bAutoPlay = true; Array.Resize(ref videoCache.m_TargetMaterial, 1); videoCache.m_TargetMaterial[0] = selectTarget[i]; videoCache.Play(); } else { Debug.Log("Cannot load videocache."); } } }