默认加载PPT

This commit is contained in:
huqibin 2025-05-30 16:57:06 +08:00
parent 017e1cb556
commit a42cf4ff14
3 changed files with 16 additions and 9 deletions

View File

@ -436,4 +436,4 @@ MonoBehaviour:
onValueChanged:
m_PersistentCalls:
m_Calls: []
m_IsOn: 1
m_IsOn: 0

View File

@ -130,7 +130,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0.00018310547}
m_SizeDelta: {x: -236, y: 12}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &235241195840539889
MonoBehaviour:
@ -184,7 +184,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 2fafe2cfe61f6974895a912c3755e8f1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AllowSwitchOff: 0
m_AllowSwitchOff: 1
--- !u!1 &1274212127849608913
GameObject:
m_ObjectHideFlags: 0
@ -633,7 +633,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 17, y: 940}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &6919009669462823272
MonoBehaviour:

View File

@ -53,6 +53,7 @@ public class UI_PPTForPracticePanel : BasePanel
Debug.Log($"ÒÑ´´½¨°´Å¥: {item.Name} (ÅÅÐò¼ü: {item.Order})");
}
base.Awake();
//pptConfig = JsonManager.LoadData<PPTConfig>("pptConfig");
if (ppts == null || ppts.Length == 0)
{
@ -63,11 +64,17 @@ public class UI_PPTForPracticePanel : BasePanel
void Start()
{
// 监听单页加载完成事件
PPTManager.Instance.OnSinglePageLoaded += texture => {
// 立即显示当前加载的页面
DisplaySinglePage(texture);
};
StartCoroutine(AsyncInitPPT());
}
IEnumerator AsyncInitPPT()
{
if (Left_content.transform.childCount > 0)
{
Left_content.GetChild(0).GetComponentInChildren<Toggle>().isOn = true;
}
yield return null;
}
public override void ShowMe()