|
@@ -22,10 +22,12 @@ public class TemplateVideo : BaseTemPlate
|
|
|
|
|
|
private void OnDisable()
|
|
|
{
|
|
|
+ TemplateVideo.isPlaying = false;
|
|
|
Debug.Log("HJJ 停止播放");
|
|
|
m_Video.Stop();
|
|
|
if (temQueue.Count>0)
|
|
|
temQueue = new Queue<TemplateVideo>();
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
@@ -57,7 +59,7 @@ public class TemplateVideo : BaseTemPlate
|
|
|
if (autoplay)
|
|
|
{
|
|
|
Debug.Log("HJJ 开始自动播放" + localSavePath);
|
|
|
- temQueue.Enqueue(this);
|
|
|
+ StartCoroutine(ADDAutoPlay());
|
|
|
|
|
|
|
|
|
|
|
@@ -69,7 +71,15 @@ public class TemplateVideo : BaseTemPlate
|
|
|
}
|
|
|
setScale = true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ IEnumerator ADDAutoPlay()
|
|
|
+ {
|
|
|
+ yield return new WaitForSeconds(0.3f);
|
|
|
+ Debug.Log("HJJ 开始自动播放加入數組" + localSavePath);
|
|
|
+ temQueue.Enqueue(this);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
private bool setScale;
|
|
|
protected override void OnAwake()
|
|
|
{
|