Updating and loading videos on new case loads should now be much more reliable.
This commit is contained in:
parent
9feccb75c6
commit
be83f3a0b2
@ -82874,7 +82874,7 @@ MonoBehaviour:
|
||||
PrefabModifications: []
|
||||
SerializationNodes: []
|
||||
_udonSharpBackingUdonBehaviour: {fileID: 2057791819}
|
||||
_CaseManager: {fileID: 841163054}
|
||||
_GameManager: {fileID: 515404446}
|
||||
_VideoPlayer: {fileID: 2057791821}
|
||||
_BlankScreenMesh: {fileID: 1123331149}
|
||||
_VideoScreenMesh: {fileID: 1123331146}
|
||||
@ -93355,64 +93355,64 @@ MonoBehaviour:
|
||||
useAssignedLayers: 0
|
||||
DynamicPrefabs: []
|
||||
DynamicMaterials:
|
||||
- {fileID: 2100000, guid: 4fb0b8cdca56f5d47be970c7490cb7a1, type: 2}
|
||||
- {fileID: 2100000, guid: c3186340e03d26341969d34663dbf8f3, type: 2}
|
||||
- {fileID: 2100000, guid: c10453b4aa0c864458b74f3797cb611e, type: 2}
|
||||
- {fileID: 2100000, guid: 12e96dbe16f21704485645506bfc235a, type: 2}
|
||||
- {fileID: 2100000, guid: 77cb94791cc41a5498279122022730b0, type: 2}
|
||||
- {fileID: 2100000, guid: dba163de40c568b48ae2ffa7c83c66b9, type: 2}
|
||||
- {fileID: 2100000, guid: 348ff3cc54305654d9eeebbbb385c262, type: 2}
|
||||
- {fileID: 2100000, guid: 9cdc0250a4c9b534fae68ae6aa90bf31, type: 2}
|
||||
- {fileID: 2100000, guid: 77485a45419b5da498cc74acff31c49a, type: 2}
|
||||
- {fileID: 2100000, guid: 483ceb65615010745bde1d5ff9fd9dd6, type: 2}
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 2100000, guid: bc5888e576e9cb34bab7b7af42d2b63f, type: 2}
|
||||
- {fileID: 2100000, guid: 1eb2f964062497347b887d2c940e79c5, type: 2}
|
||||
- {fileID: 2100000, guid: d23dd47c26278f94ea3bc15c730f59ed, type: 2}
|
||||
- {fileID: 2100000, guid: c0998459c7ac0e94d825035839d01ac9, type: 2}
|
||||
- {fileID: 2100000, guid: d1244b908a4cccd4397cc9cad45fe846, type: 2}
|
||||
- {fileID: 2100000, guid: e53b90b5a4f1c3048b28024a40b455e7, type: 2}
|
||||
- {fileID: 2100000, guid: 98b5c6e030fc83d48bbba9e927a456d4, type: 2}
|
||||
- {fileID: 2100000, guid: db9b2b735115eb248a189b1fdc721a50, type: 2}
|
||||
- {fileID: 2100000, guid: 9d4baac78c2042b47b42fc9c92d87767, type: 2}
|
||||
- {fileID: 2100000, guid: c5d2a6b0c3904c747b937dd142cbb480, type: 2}
|
||||
- {fileID: 2100000, guid: 82f2961c9baa48a45ac897be257fd655, type: 2}
|
||||
- {fileID: 2100000, guid: fa8f228d6d5f77d479bf970e355f4bc3, type: 2}
|
||||
- {fileID: 2100000, guid: e45d02bbf7268504ca58513c548a58e7, type: 2}
|
||||
- {fileID: 2100000, guid: 35c2a316ece610b4b963e047e5238337, type: 2}
|
||||
- {fileID: 2100000, guid: 8de5e47a4e3831b40b59595ad3e2e267, type: 2}
|
||||
- {fileID: 2100000, guid: 6075d345a5007be4abb1a4485d1ebb5f, type: 2}
|
||||
- {fileID: 2100000, guid: 79cdc811085b366438fb60b12a3642ba, type: 2}
|
||||
- {fileID: 2100000, guid: 8db36ece14c543d47be04e1d0cde1a1f, type: 2}
|
||||
- {fileID: 2100000, guid: d7188495ea0838346af40c820ec9ffc8, type: 2}
|
||||
- {fileID: 2100000, guid: 80746b095abb6ce41a1c737df3649172, type: 2}
|
||||
- {fileID: 2100000, guid: 885429151ec5f6a4a926f6aaabd7e001, type: 2}
|
||||
- {fileID: 2100000, guid: 90a6fdf8f72a7a84d83dcb448e0f749e, type: 2}
|
||||
- {fileID: 2100000, guid: 012e77fb6a6d69548802da3b41814618, type: 2}
|
||||
- {fileID: 2100000, guid: 4d875a76d6e247742b8d3d66214b2c2d, type: 2}
|
||||
- {fileID: 2100000, guid: d2b3854a83244764192826cd7eadc955, type: 2}
|
||||
- {fileID: 2100000, guid: ffd504a9168a01c459170bb8f2fcea1c, type: 2}
|
||||
- {fileID: 2100000, guid: 332daba92d0976f4d86bdcdc1a94179e, type: 2}
|
||||
- {fileID: 2100000, guid: c1b531b2f1a7dab43b46daa7546cfda7, type: 2}
|
||||
- {fileID: 2100000, guid: 0c3dfdcd7a2a6ac408ec3d431f9a4932, type: 2}
|
||||
- {fileID: 2100000, guid: accd304c49b7d6d43b97738e8e118342, type: 2}
|
||||
- {fileID: 2100000, guid: 2c0cd617d97924748a9d5e2eeb2039b5, type: 2}
|
||||
- {fileID: 2100000, guid: 0c3dfdcd7a2a6ac408ec3d431f9a4932, type: 2}
|
||||
- {fileID: 2100000, guid: c1b531b2f1a7dab43b46daa7546cfda7, type: 2}
|
||||
- {fileID: 2100000, guid: cac39def7281c5c488b6a3465ec1951b, type: 2}
|
||||
- {fileID: 2100000, guid: 672c36f6dbb36b5439cc0fdd2f74c531, type: 2}
|
||||
- {fileID: 2100000, guid: 51b03d257a738e6468f623865f31dbec, type: 2}
|
||||
- {fileID: 2100000, guid: af0c1cbaaffed304ba0e3a1fbac41e7e, type: 2}
|
||||
- {fileID: 2100000, guid: cc22c7f9de95cab4488b30fe8699a82a, type: 2}
|
||||
- {fileID: 2100000, guid: fe872fb72ad98da4dbb868481468e848, type: 2}
|
||||
- {fileID: 2100000, guid: 4fb0b8cdca56f5d47be970c7490cb7a1, type: 2}
|
||||
- {fileID: 2100000, guid: d1244b908a4cccd4397cc9cad45fe846, type: 2}
|
||||
- {fileID: 2100000, guid: e53b90b5a4f1c3048b28024a40b455e7, type: 2}
|
||||
- {fileID: 2100000, guid: 4de84333504452948874f4422dec7b56, type: 2}
|
||||
- {fileID: 2100000, guid: 97a375a2664a65f44a74b8e0711591fb, type: 2}
|
||||
- {fileID: 2100000, guid: 9cdc0250a4c9b534fae68ae6aa90bf31, type: 2}
|
||||
- {fileID: 2100000, guid: 71fff76911e92ab43a71d15602da4c4b, type: 2}
|
||||
- {fileID: 2100000, guid: 4c14b2f4b9a613f418bb1e6cf8cf68f4, type: 2}
|
||||
- {fileID: 2100000, guid: ea08301eace4f164bb3aae930413a978, type: 2}
|
||||
- {fileID: 2100000, guid: 6dd6b8b1c8133f04dbc23ac81f5dfded, type: 2}
|
||||
- {fileID: 2100000, guid: c3186340e03d26341969d34663dbf8f3, type: 2}
|
||||
- {fileID: 2100000, guid: 012e77fb6a6d69548802da3b41814618, type: 2}
|
||||
- {fileID: 2100000, guid: 4d875a76d6e247742b8d3d66214b2c2d, type: 2}
|
||||
- {fileID: 2100000, guid: 12e96dbe16f21704485645506bfc235a, type: 2}
|
||||
- {fileID: 2100000, guid: 8db36ece14c543d47be04e1d0cde1a1f, type: 2}
|
||||
- {fileID: 2100000, guid: 77485a45419b5da498cc74acff31c49a, type: 2}
|
||||
- {fileID: 2100000, guid: d2b3854a83244764192826cd7eadc955, type: 2}
|
||||
- {fileID: 2100000, guid: 8de5e47a4e3831b40b59595ad3e2e267, type: 2}
|
||||
- {fileID: 2100000, guid: d23dd47c26278f94ea3bc15c730f59ed, type: 2}
|
||||
- {fileID: 2100000, guid: 77cb94791cc41a5498279122022730b0, type: 2}
|
||||
- {fileID: 2100000, guid: 98b5c6e030fc83d48bbba9e927a456d4, type: 2}
|
||||
- {fileID: 2100000, guid: c0998459c7ac0e94d825035839d01ac9, type: 2}
|
||||
- {fileID: 2100000, guid: fa8f228d6d5f77d479bf970e355f4bc3, type: 2}
|
||||
- {fileID: 2100000, guid: 90a6fdf8f72a7a84d83dcb448e0f749e, type: 2}
|
||||
- {fileID: 2100000, guid: 6075d345a5007be4abb1a4485d1ebb5f, type: 2}
|
||||
- {fileID: 2100000, guid: d7188495ea0838346af40c820ec9ffc8, type: 2}
|
||||
- {fileID: 2100000, guid: 79cdc811085b366438fb60b12a3642ba, type: 2}
|
||||
- {fileID: 2100000, guid: ffd504a9168a01c459170bb8f2fcea1c, type: 2}
|
||||
- {fileID: 2100000, guid: 98166ed003d332e488319f662c3b4429, type: 2}
|
||||
- {fileID: 2100000, guid: c5d2a6b0c3904c747b937dd142cbb480, type: 2}
|
||||
- {fileID: 2100000, guid: 53b84df3db050264db8132d12d59ac74, type: 2}
|
||||
- {fileID: 2100000, guid: 9d4baac78c2042b47b42fc9c92d87767, type: 2}
|
||||
- {fileID: 2100000, guid: db9b2b735115eb248a189b1fdc721a50, type: 2}
|
||||
- {fileID: 2100000, guid: cc8e36941dd3f2c42a157650e05b9242, type: 2}
|
||||
- {fileID: 2100000, guid: 885429151ec5f6a4a926f6aaabd7e001, type: 2}
|
||||
- {fileID: 2100000, guid: 348ff3cc54305654d9eeebbbb385c262, type: 2}
|
||||
- {fileID: 2100000, guid: a94d8fe1854504e47a64e023cecaa130, type: 2}
|
||||
- {fileID: 2100000, guid: 51b03d257a738e6468f623865f31dbec, type: 2}
|
||||
- {fileID: 2100000, guid: e45d02bbf7268504ca58513c548a58e7, type: 2}
|
||||
- {fileID: 2100000, guid: 35c2a316ece610b4b963e047e5238337, type: 2}
|
||||
- {fileID: 2100000, guid: 1eb2f964062497347b887d2c940e79c5, type: 2}
|
||||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- {fileID: 2100000, guid: 672c36f6dbb36b5439cc0fdd2f74c531, type: 2}
|
||||
- {fileID: 2100000, guid: bc5888e576e9cb34bab7b7af42d2b63f, type: 2}
|
||||
- {fileID: 2100000, guid: cac39def7281c5c488b6a3465ec1951b, type: 2}
|
||||
- {fileID: 2100000, guid: 80746b095abb6ce41a1c737df3649172, type: 2}
|
||||
- {fileID: 2100000, guid: 332daba92d0976f4d86bdcdc1a94179e, type: 2}
|
||||
- {fileID: 2100000, guid: dba163de40c568b48ae2ffa7c83c66b9, type: 2}
|
||||
- {fileID: 2100000, guid: 483ceb65615010745bde1d5ff9fd9dd6, type: 2}
|
||||
- {fileID: 2100000, guid: c10453b4aa0c864458b74f3797cb611e, type: 2}
|
||||
LightMapsNear: []
|
||||
LightMapsFar: []
|
||||
LightMode: 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
||||
|
||||
using Newtonsoft.Json.Linq;
|
||||
using UdonSharp;
|
||||
using UnityEngine;
|
||||
using VRC.SDK3.Components.Video;
|
||||
@ -21,10 +22,10 @@ public enum ClueScreenType
|
||||
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
|
||||
public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
{
|
||||
[SerializeField] private CaseManager _CaseManager;
|
||||
[SerializeField] private GameManagerRound1 _GameManager;
|
||||
|
||||
[SerializeField] private BaseVRCVideoPlayer _VideoPlayer;
|
||||
/*[SerializeField]*/ private float _SyncFrequency = 5.0f;
|
||||
//[SerializeField] private float _SyncFrequency = 5.0f;
|
||||
|
||||
[Header("Meshes")]
|
||||
[SerializeField] private MeshRenderer _BlankScreenMesh;
|
||||
@ -47,9 +48,15 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
|
||||
[UdonSynced, FieldChangeCallback(nameof(PlayVideo))] private bool _VideoIsPlaying;
|
||||
|
||||
[UdonSynced] private VRCUrl[] _CaseMapsList = new VRCUrl[0];
|
||||
private VRCUrl[] _CaseMapsListCache = new VRCUrl[0];
|
||||
|
||||
[UdonSynced] private int[] _CachedMapIndices = new int[0];
|
||||
private int[] _LoadedMaps = new int[0];
|
||||
|
||||
[UdonSynced] private VRCUrl[] _CaseVideoList = new VRCUrl[0];
|
||||
private VRCUrl[] _CaseVideoListCache = new VRCUrl[0];
|
||||
|
||||
private VRCImageDownloader _MapDownloader;
|
||||
private Texture2D[] _MapImages = new Texture2D[0];
|
||||
private IUdonEventReceiver _UdonEventReceiverThis;
|
||||
@ -80,6 +87,9 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
|
||||
public override void OnDeserialization(DeserializationResult Result)
|
||||
{
|
||||
{ // Map syncing and redownloading
|
||||
_ReloadMapList();
|
||||
|
||||
if (_MapDownloadsInProgress)
|
||||
{
|
||||
return;
|
||||
@ -107,10 +117,43 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
Debug.Log("[CaseVideoSyncPlayer] Redownloading old maps...");
|
||||
QueueMapDownloads(_CachedMapIndices);
|
||||
}
|
||||
}
|
||||
|
||||
{ // Video syncing and redownloading
|
||||
_ReloadVideoList();
|
||||
}
|
||||
|
||||
base.OnDeserialization(Result);
|
||||
}
|
||||
|
||||
public void SetNewLists(VRCUrl[] Maps, VRCUrl[] Videos)
|
||||
{
|
||||
_CaseMapsList = Maps;
|
||||
_ReloadMapList();
|
||||
|
||||
_CaseVideoList = Videos;
|
||||
_ReloadVideoList();
|
||||
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
private void _ReloadMapList()
|
||||
{
|
||||
if (_IsUrlListDifferent(_CaseMapsList, _CaseMapsListCache))
|
||||
{
|
||||
_CaseMapsListCache = (VRCUrl[])_CaseMapsList.Clone();
|
||||
}
|
||||
}
|
||||
|
||||
private void _ReloadVideoList()
|
||||
{
|
||||
if (_IsUrlListDifferent(_CaseVideoList, _CaseVideoListCache))
|
||||
{
|
||||
_CaseVideoListCache = (VRCUrl[])_CaseVideoList.Clone();
|
||||
_GameManager.TryIntroVideoLoad();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[NetworkCallable]
|
||||
public void QueueMapDownloads(int[] MapIndices)
|
||||
@ -148,11 +191,11 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
_MapDownloadIndex = 0;
|
||||
LoadMapFromIndex(_CachedMapIndices[_MapDownloadIndex]);
|
||||
}
|
||||
_LoadedMaps = _CachedMapIndices;
|
||||
_LoadedMaps = (int[])_CachedMapIndices.Clone();
|
||||
}
|
||||
private void LoadMapFromIndex(int MapIndex)
|
||||
{
|
||||
VRCUrl MapURL = _CaseManager.GetMap(MapIndex);
|
||||
VRCUrl MapURL = _CaseMapsList[MapIndex];
|
||||
|
||||
TextureInfo AdditionalTextureInfo = new TextureInfo();
|
||||
AdditionalTextureInfo.WrapModeU = TextureWrapMode.Clamp;
|
||||
@ -235,15 +278,26 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
}
|
||||
|
||||
|
||||
public void SetVideoIndexLocal(int Index)
|
||||
{
|
||||
_VideoIndex = Index;
|
||||
_VideoLoadAttemptCounter = 0;
|
||||
if (_VideoIndex >= 0)
|
||||
{
|
||||
_UseFallback = false;
|
||||
_LoadVideo_Private();
|
||||
}
|
||||
}
|
||||
|
||||
private void _LoadVideo_Private()
|
||||
{
|
||||
TryLoadURL();
|
||||
}
|
||||
public void TryLoadURL()
|
||||
{
|
||||
if (VideoIndex >= 0 && VideoIndex < _CaseManager.GetVideoCount())
|
||||
if (VideoIndex >= 0 && VideoIndex < _CaseVideoList.Length)
|
||||
{
|
||||
_VideoPlayer.LoadURL(_CaseManager.GetVideo(VideoIndex, _UseFallback));
|
||||
_VideoPlayer.LoadURL(_CaseVideoList[VideoIndex]);
|
||||
SetVideoLoadStatus(IndicationStatus.Loading);
|
||||
}
|
||||
else
|
||||
@ -280,8 +334,6 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
|
||||
public override void OnVideoReady()
|
||||
{
|
||||
Debug.Log("[CaseVideoSyncPlayer] Video is ready.");
|
||||
|
||||
if (_VideoIsPlaying)
|
||||
{
|
||||
_PlayVideo_Private();
|
||||
@ -309,8 +361,9 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
Debug.LogError("[CaseVideoSyncPlayer] Error with video player.");
|
||||
break;
|
||||
case VideoError.RateLimited:
|
||||
Debug.LogError("[CaseVideoSyncPlayer] Rate limited.");
|
||||
break;
|
||||
Debug.LogError("[CaseVideoSyncPlayer] Rate limited. Attempting another reload in 2 seconds...");
|
||||
SendCustomEventDelayedSeconds(nameof(TryLoadURL), 2.1f);
|
||||
return;
|
||||
}
|
||||
|
||||
//if (_UseFallback)
|
||||
@ -371,39 +424,39 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
|
||||
public void SetVideoLoadStatus(IndicationStatus Status)
|
||||
{
|
||||
Debug.Log("[CaseVideoSyncPlayer] Checking video load indicators for " + Networking.LocalPlayer.displayName + "...");
|
||||
//Debug.Log("[CaseVideoSyncPlayer] Checking video load indicators for " + Networking.LocalPlayer.displayName + "...");
|
||||
foreach (VideoLoadIndicator Indicator in _VideoLoadIndicators)
|
||||
{
|
||||
if (Indicator.GetOwner() == Networking.LocalPlayer.displayName)
|
||||
{
|
||||
Debug.Log("[CaseVideoSyncPlayer] " + Indicator.GetOwner() + "'s video load indicator was found. Setting status to " + Status + "...");
|
||||
//Debug.Log("[CaseVideoSyncPlayer] " + Indicator.GetOwner() + "'s video load indicator was found. Setting status to " + Status + "...");
|
||||
Indicator.IndicateStatus = Status;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("[CaseVideoSyncPlayer] This one is owned by " + Indicator.GetOwner() + ". Not what we want.");
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// Debug.Log("[CaseVideoSyncPlayer] This one is owned by " + Indicator.GetOwner() + ". Not what we want.");
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateTimeAndOffset()
|
||||
{
|
||||
if (Networking.IsOwner(gameObject))
|
||||
{
|
||||
TimeAndOffset = new Vector2(_VideoPlayer.GetTime(), (float)Networking.GetServerTimeInSeconds());
|
||||
//private void UpdateTimeAndOffset()
|
||||
//{
|
||||
// if (Networking.IsOwner(gameObject))
|
||||
// {
|
||||
// TimeAndOffset = new Vector2(_VideoPlayer.GetTime(), (float)Networking.GetServerTimeInSeconds());
|
||||
|
||||
if (_SyncFrequency > 0.0f)
|
||||
{
|
||||
SendCustomEventDelayedSeconds(nameof(UpdateTimeAndOffset), _SyncFrequency);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Resync();
|
||||
}
|
||||
// if (_SyncFrequency > 0.0f)
|
||||
// {
|
||||
// SendCustomEventDelayedSeconds(nameof(UpdateTimeAndOffset), _SyncFrequency);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Resync();
|
||||
// }
|
||||
|
||||
RequestSerialization();
|
||||
}
|
||||
// RequestSerialization();
|
||||
//}
|
||||
|
||||
public void Resync()
|
||||
{
|
||||
@ -419,7 +472,7 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
}
|
||||
|
||||
|
||||
private void SwapToScreen(ClueScreenType Screen)
|
||||
private void _SwapToScreen(ClueScreenType Screen)
|
||||
{
|
||||
if (ShowScreen == Screen) return;
|
||||
|
||||
@ -455,6 +508,26 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
RequestSerialization();
|
||||
}
|
||||
|
||||
private bool _IsUrlListDifferent(VRCUrl[] New, VRCUrl[] Cached)
|
||||
{
|
||||
if (New.Length == Cached.Length)
|
||||
{
|
||||
for (int i = 0; i < New.Length; i++)
|
||||
{
|
||||
if (New[i].ToString() != Cached[i].ToString())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public int SubMapIndex
|
||||
{
|
||||
@ -470,7 +543,7 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
{
|
||||
set
|
||||
{
|
||||
SwapToScreen(value);
|
||||
_SwapToScreen(value);
|
||||
_ShowScreen = value;
|
||||
}
|
||||
get => _ShowScreen;
|
||||
@ -491,15 +564,12 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
||||
{
|
||||
set
|
||||
{
|
||||
_VideoIndex = value;
|
||||
_VideoLoadAttemptCounter = 0;
|
||||
if (_VideoIndex >= 0)
|
||||
if (_VideoIndex != value)
|
||||
{
|
||||
_UseFallback = false;
|
||||
_LoadVideo_Private();
|
||||
}
|
||||
SetVideoIndexLocal(value);
|
||||
RequestSerialization();
|
||||
}
|
||||
}
|
||||
get => _VideoIndex;
|
||||
}
|
||||
|
||||
|
||||
@ -116,6 +116,8 @@ public class CaseManager : UdonSharpBehaviour
|
||||
_CaseFileVideosFallback = CaseFile.FallbackVideoFiles;
|
||||
_CaseFileClueImages = CaseFile.ClueImages;
|
||||
|
||||
_Round1Manager.SetNewVideoPlayerLists(_CaseFileMaps, _CaseFileVideos);
|
||||
|
||||
VRCStringDownloader.LoadUrl(_CaseFileCluesURL, (IUdonEventReceiver)this);
|
||||
}
|
||||
|
||||
|
||||
@ -139,16 +139,20 @@ public class GameManagerRound1 : GameManagerBase
|
||||
Interface.HeaderUI.text = _CaseManager.GetCaseTitle() + " has been loaded.";
|
||||
Interface.CommentUI.text = _CaseManager.GetCaseDescription();
|
||||
|
||||
TryIntroVideoLoad();
|
||||
|
||||
_GameHasBegun = false;
|
||||
}
|
||||
|
||||
|
||||
public void SetNewVideoPlayerLists(VRCUrl[] Maps, VRCUrl[] Videos)
|
||||
{
|
||||
_VideoPlayer.SetNewLists(Maps, Videos);
|
||||
}
|
||||
public void TryIntroVideoLoad()
|
||||
{
|
||||
int IntroVideoIndex = _CaseManager.GetIntroVideo();
|
||||
if (IntroVideoIndex >= 0)
|
||||
{
|
||||
_VideoPlayer.VideoIndex = IntroVideoIndex;
|
||||
_VideoPlayer.SetVideoIndexLocal(IntroVideoIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user