Video loads on case load are much more reliable now.
This commit is contained in:
parent
01a601d9da
commit
9feccb75c6
File diff suppressed because it is too large
Load Diff
@ -44,7 +44,7 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 12
|
Entry: 12
|
||||||
Data: 23
|
Data: 24
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data:
|
Data:
|
||||||
@ -1361,19 +1361,19 @@ MonoBehaviour:
|
|||||||
Data:
|
Data:
|
||||||
- Name: $k
|
- Name: $k
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _UseFallback
|
Data: _VideoLoadAttemptCounter
|
||||||
- Name: $v
|
- Name: $v
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: 87|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
Data: 87|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
- Name: <Name>k__BackingField
|
- Name: <Name>k__BackingField
|
||||||
Entry: 1
|
Entry: 1
|
||||||
Data: _UseFallback
|
Data: _VideoLoadAttemptCounter
|
||||||
- Name: <UserType>k__BackingField
|
- Name: <UserType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 51
|
Data: 41
|
||||||
- Name: <SystemType>k__BackingField
|
- Name: <SystemType>k__BackingField
|
||||||
Entry: 9
|
Entry: 9
|
||||||
Data: 51
|
Data: 41
|
||||||
- Name: <SyncMode>k__BackingField
|
- Name: <SyncMode>k__BackingField
|
||||||
Entry: 7
|
Entry: 7
|
||||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
@ -1404,6 +1404,54 @@ MonoBehaviour:
|
|||||||
- Name:
|
- Name:
|
||||||
Entry: 8
|
Entry: 8
|
||||||
Data:
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 7
|
||||||
|
Data:
|
||||||
|
- Name: $k
|
||||||
|
Entry: 1
|
||||||
|
Data: _UseFallback
|
||||||
|
- Name: $v
|
||||||
|
Entry: 7
|
||||||
|
Data: 89|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||||
|
- Name: <Name>k__BackingField
|
||||||
|
Entry: 1
|
||||||
|
Data: _UseFallback
|
||||||
|
- Name: <UserType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 51
|
||||||
|
- Name: <SystemType>k__BackingField
|
||||||
|
Entry: 9
|
||||||
|
Data: 51
|
||||||
|
- Name: <SyncMode>k__BackingField
|
||||||
|
Entry: 7
|
||||||
|
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 6
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name: <IsSerialized>k__BackingField
|
||||||
|
Entry: 5
|
||||||
|
Data: false
|
||||||
|
- Name: _fieldAttributes
|
||||||
|
Entry: 7
|
||||||
|
Data: 90|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||||
|
- Name:
|
||||||
|
Entry: 12
|
||||||
|
Data: 0
|
||||||
|
- Name:
|
||||||
|
Entry: 13
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
|
- Name:
|
||||||
|
Entry: 8
|
||||||
|
Data:
|
||||||
- Name:
|
- Name:
|
||||||
Entry: 13
|
Entry: 13
|
||||||
Data:
|
Data:
|
||||||
|
|||||||
@ -56,9 +56,11 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
|||||||
private int _MapDownloadIndex = 0;
|
private int _MapDownloadIndex = 0;
|
||||||
private bool _MapDownloadsInProgress = false;
|
private bool _MapDownloadsInProgress = false;
|
||||||
|
|
||||||
|
private int _VideoLoadAttemptCounter = 0;
|
||||||
private bool _UseFallback = false;
|
private bool _UseFallback = false;
|
||||||
|
|
||||||
private const int IMAGES_PER_MAP_ATLAS = 6;
|
private const int IMAGES_PER_MAP_ATLAS = 6;
|
||||||
|
private const int MAX_VIDEO_LOAD_ATTEMPTS = 5;
|
||||||
|
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
@ -246,7 +248,19 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.LogWarning("[CaseVideoSyncPlayer] Index is out of range.");
|
if (_VideoLoadAttemptCounter >= MAX_VIDEO_LOAD_ATTEMPTS)
|
||||||
|
{
|
||||||
|
Debug.LogError("[CaseVideoSyncPlayer] Index " + VideoIndex + " is out of range. Out of retry attempts. Something is wrong.");
|
||||||
|
SetVideoLoadStatus(IndicationStatus.LoadFailure);
|
||||||
|
_VideoLoadAttemptCounter = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogWarning("[CaseVideoSyncPlayer] Index " + VideoIndex + " is out of range. Checking range again in 1 second...");
|
||||||
|
SetVideoLoadStatus(IndicationStatus.Loading);
|
||||||
|
_VideoLoadAttemptCounter++;
|
||||||
|
SendCustomEventDelayedSeconds(nameof(TryLoadURL), 1.1f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,17 +313,17 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_UseFallback)
|
//if (_UseFallback)
|
||||||
{
|
//{
|
||||||
_StopVideo_Private();
|
_StopVideo_Private();
|
||||||
}
|
//}
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
Debug.Log("[CaseVideoSyncPlayer] Attempting fallback in 5 seconds...");
|
// Debug.Log("[CaseVideoSyncPlayer] Attempting fallback in 5 seconds...");
|
||||||
SendCustomEventDelayedSeconds(nameof(TryLoadFallbackURL), 5.5f);
|
// SendCustomEventDelayedSeconds(nameof(TryLoadFallbackURL), 5.5f);
|
||||||
}
|
//}
|
||||||
|
|
||||||
SetVideoLoadStatus(IndicationStatus.LoadFailure);
|
//SetVideoLoadStatus(IndicationStatus.LoadFailure);
|
||||||
|
|
||||||
base.OnVideoError(VideoError);
|
base.OnVideoError(VideoError);
|
||||||
}
|
}
|
||||||
@ -478,6 +492,7 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
_VideoIndex = value;
|
_VideoIndex = value;
|
||||||
|
_VideoLoadAttemptCounter = 0;
|
||||||
if (_VideoIndex >= 0)
|
if (_VideoIndex >= 0)
|
||||||
{
|
{
|
||||||
_UseFallback = false;
|
_UseFallback = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user