2.0006
This commit is contained in:
parent
7df0bf4b6f
commit
693b915b0a
|
|
@ -473,7 +473,7 @@ namespace HighlightPlus {
|
|||
glowPasses[3] = new GlowPassData() { offset = 1, alpha = 0.4f, color = new Color(0.64f, 1f, 0f, 1f) };
|
||||
}
|
||||
sourceRT = Shader.PropertyToID("_HPSourceRT");
|
||||
useGPUInstancing = GPUInstancing && SystemInfo.supportsInstancing;
|
||||
useGPUInstancing = SystemInfo.supportsInstancing;
|
||||
if (useGPUInstancing) {
|
||||
if (glowPropertyBlock == null) {
|
||||
glowPropertyBlock = new MaterialPropertyBlock();
|
||||
|
|
|
|||
|
|
@ -76,10 +76,10 @@ namespace RenderHeads.Media.AVProVideo
|
|||
result = GetPlatformMediaReference(Platform.WebGL);
|
||||
#endif
|
||||
|
||||
if (result == null)
|
||||
{
|
||||
|
||||
|
||||
result = this;
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,57 +9,7 @@ namespace RenderHeads.Media.AVProVideo
|
|||
{
|
||||
public partial class MediaPlayer : MonoBehaviour
|
||||
{
|
||||
#region Application Focus and Pausing
|
||||
#if !UNITY_EDITOR
|
||||
void OnApplicationFocus(bool focusStatus)
|
||||
{
|
||||
#if !(UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
|
||||
// Debug.Log("OnApplicationFocus: focusStatus: " + focusStatus);
|
||||
|
||||
if (focusStatus && (isActiveAndEnabled && enabled))
|
||||
{
|
||||
if (Control != null && _wasPlayingOnPause)
|
||||
{
|
||||
_wasPlayingOnPause = false;
|
||||
Control.Play();
|
||||
|
||||
Helper.LogInfo("OnApplicationFocus: playing video again");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void OnApplicationPause(bool pauseStatus)
|
||||
{
|
||||
#if !(UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN)
|
||||
// Debug.Log("OnApplicationPause: pauseStatus: " + pauseStatus);
|
||||
|
||||
if (pauseStatus)
|
||||
{
|
||||
if (_pauseMediaOnAppPause)
|
||||
{
|
||||
if (Control!= null && Control.IsPlaying())
|
||||
{
|
||||
_wasPlayingOnPause = true;
|
||||
#if !UNITY_IPHONE
|
||||
Control.Pause();
|
||||
#endif
|
||||
Helper.LogInfo("OnApplicationPause: pausing video");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_playMediaOnAppUnpause)
|
||||
{
|
||||
// Catch coming back from power off state when no lock screen
|
||||
OnApplicationFocus(true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endregion // Application Focus and Pausing
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ namespace RenderHeads.Media.AVProVideo
|
|||
const float StallDetectionDuration = 0.5f;
|
||||
|
||||
// Manually detect stalled video if the platform doesn't have native support to detect it
|
||||
if (SupportsTextureFrameCount() && IsExpectingNewVideoFrame())
|
||||
if (IsExpectingNewVideoFrame())
|
||||
{
|
||||
// Detect a new video frame
|
||||
int frameCount = GetTextureFrameCount();
|
||||
|
|
|
|||
|
|
@ -386,16 +386,16 @@ namespace Framework.Manager
|
|||
if (GuideMask.Instance.guide != null)
|
||||
GuideMask.Instance.guide.gameObject.SetActive(true);
|
||||
|
||||
bool hasJumpedToGuide = false;
|
||||
|
||||
|
||||
|
||||
var orderedSteps = guideConfig.GetOrderedSteps();
|
||||
|
||||
// 只有在没有跳转到引导步骤的情况下才执行currentIndex++
|
||||
if (!hasJumpedToGuide)
|
||||
{
|
||||
|
||||
|
||||
currentIndex++;
|
||||
}
|
||||
|
||||
|
||||
if (currentIndex < orderedSteps.Count)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -55,33 +55,33 @@ namespace DefaultNamespace
|
|||
|
||||
List<(string name, string url)> fileInfos;
|
||||
|
||||
if (useGlobalExamName)
|
||||
{
|
||||
|
||||
|
||||
// 使用全局题目名字
|
||||
fileInfos = await FileComponent.GetExamFileInfoWithUrls();
|
||||
string examName = MotionEngine.GetModule<GlobalDataStorage>().ExamName;
|
||||
Debug.Log($"使用全局题目名字:{examName}");
|
||||
}
|
||||
else
|
||||
{
|
||||
// 使用指定的题目名称
|
||||
var examFileInfos = await FileComponent.GetExamFileInfos(examTypeName);
|
||||
fileInfos = examFileInfos.Select(f => (f.name, f.url)).ToList();
|
||||
Debug.Log($"使用指定题目名称:{examTypeName}");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (fileInfos.Count == 0)
|
||||
{
|
||||
string examInfo = useGlobalExamName ?
|
||||
MotionEngine.GetModule<GlobalDataStorage>().ExamName :
|
||||
examTypeName;
|
||||
string examInfo = MotionEngine.GetModule<GlobalDataStorage>().ExamName ;
|
||||
|
||||
|
||||
Debug.LogWarning($"题目 '{examInfo}' 没有配置任何文件");
|
||||
return;
|
||||
}
|
||||
|
||||
string examDisplay = useGlobalExamName ?
|
||||
MotionEngine.GetModule<GlobalDataStorage>().ExamName :
|
||||
examTypeName;
|
||||
string examDisplay =MotionEngine.GetModule<GlobalDataStorage>().ExamName ;
|
||||
|
||||
|
||||
Debug.Log($"为题目 '{examDisplay}' 准备 {fileInfos.Count} 个文件,等待下载完成后显示按钮");
|
||||
|
||||
// 不再在初始化时创建按钮,而是等待文件下载完成后创建
|
||||
|
|
|
|||
|
|
@ -77,11 +77,11 @@ public class TMPInputFieldAutoSetup : MonoBehaviour
|
|||
// 自动检测组件
|
||||
AutoDetectComponents();
|
||||
|
||||
// 如果启用自动应用,则应用设置
|
||||
if (autoApplyOnAwake)
|
||||
{
|
||||
|
||||
|
||||
|
||||
ApplySettings();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue