修复场景报错问题
This commit is contained in:
parent
4577fe6940
commit
ab8e0acd05
|
|
@ -5587,6 +5587,17 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 96343c47fe8d35a44a5244521831890f, type: 3}
|
m_Script: {fileID: 11500000, guid: 96343c47fe8d35a44a5244521831890f, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
SubjectTog:
|
||||||
|
- {fileID: 8259052942713030222}
|
||||||
|
- {fileID: 5678060293557198011}
|
||||||
|
- {fileID: 8089084432970626067}
|
||||||
|
- {fileID: 8811260483391861293}
|
||||||
|
- {fileID: 6655939487465875950}
|
||||||
|
- {fileID: 657600881843389557}
|
||||||
|
- {fileID: 7027064101671987027}
|
||||||
|
- {fileID: 6672875250636715790}
|
||||||
|
- {fileID: 9149981731159942754}
|
||||||
|
- {fileID: 6296556775557808310}
|
||||||
--- !u!1 &6325379169560023408
|
--- !u!1 &6325379169560023408
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ using UnityEngine.UI;
|
||||||
public class SubjectToggle : BaseItem, IPointerEnterHandler, IPointerExitHandler
|
public class SubjectToggle : BaseItem, IPointerEnterHandler, IPointerExitHandler
|
||||||
{
|
{
|
||||||
public Toggle Toggle_Subject;
|
public Toggle Toggle_Subject;
|
||||||
public UI_ChooesPanel ChooesPanel;
|
//public UI_ChooesPanel ChooesPanel;
|
||||||
public UI_TopTitlePanel TopTitlePanel;
|
public UI_TopTitlePanel TopTitlePanel;
|
||||||
public Sprite[] subjectSprites; //科目选择图片
|
public Sprite[] subjectSprites; //科目选择图片
|
||||||
public TextMeshProUGUI SubjectNameText; //科目
|
public TextMeshProUGUI SubjectNameText; //科目
|
||||||
|
|
@ -29,6 +29,8 @@ public class SubjectToggle : BaseItem, IPointerEnterHandler, IPointerExitHandler
|
||||||
{
|
{
|
||||||
case "Subject1":
|
case "Subject1":
|
||||||
//Bootstrap.Instance.uiManager.HidePanel<UI_TopTitlePanel>();
|
//Bootstrap.Instance.uiManager.HidePanel<UI_TopTitlePanel>();
|
||||||
|
Bootstrap.Instance.uiManager.ShowPanel<UI_RoamingPanel>(this, E_UI_Layer.System, (panel) =>
|
||||||
|
{
|
||||||
Bootstrap.Instance.uiManager.ShowPanel<UI_LoadingPanel>(this, E_UI_Layer.System, (panel) =>
|
Bootstrap.Instance.uiManager.ShowPanel<UI_LoadingPanel>(this, E_UI_Layer.System, (panel) =>
|
||||||
{
|
{
|
||||||
Bootstrap.Instance.eventCenter.EventTrigger(Enum_EventType.UpdateProgress, 0.5f);
|
Bootstrap.Instance.eventCenter.EventTrigger(Enum_EventType.UpdateProgress, 0.5f);
|
||||||
|
|
@ -38,17 +40,14 @@ public class SubjectToggle : BaseItem, IPointerEnterHandler, IPointerExitHandler
|
||||||
{
|
{
|
||||||
Bootstrap.Instance.uiManager.ShowPanel<UI_ExperimentChooesPanel>(this, E_UI_Layer.Top, (panel) =>
|
Bootstrap.Instance.uiManager.ShowPanel<UI_ExperimentChooesPanel>(this, E_UI_Layer.Top, (panel) =>
|
||||||
{
|
{
|
||||||
Bootstrap.Instance.uiManager.ShowPanel<UI_RoamingPanel>(this, E_UI_Layer.System, (panel) =>
|
|
||||||
{
|
|
||||||
Bootstrap.Instance.uiManager.HidePanel<UI_ChooesPanel>();
|
|
||||||
Debug.Log("加载场景成功");
|
Debug.Log("加载场景成功");
|
||||||
Bootstrap.Instance.eventCenter.EventTrigger(Enum_EventType.UpdateProgress, 2f);
|
Bootstrap.Instance.eventCenter.EventTrigger(Enum_EventType.UpdateProgress, 2f);
|
||||||
|
Bootstrap.Instance.uiManager.HidePanel<UI_ChooesPanel>();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "Subject2":
|
case "Subject2":
|
||||||
|
|
||||||
|
|
@ -134,19 +133,19 @@ public class SubjectToggle : BaseItem, IPointerEnterHandler, IPointerExitHandler
|
||||||
/// 加载文件夹中图片
|
/// 加载文件夹中图片
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="path"></param>
|
/// <param name="path"></param>
|
||||||
public void LoadImage(string path)
|
//public void LoadImage(string path)
|
||||||
{
|
//{
|
||||||
Sprite sprite = Resources.Load<Sprite>(path);
|
// Sprite sprite = Resources.Load<Sprite>(path);
|
||||||
if (sprite != null)
|
// if (sprite != null)
|
||||||
{
|
// {
|
||||||
ChooesPanel.targetimage.sprite = sprite;
|
// ChooesPanel.targetimage.sprite = sprite;
|
||||||
Debug.Log("sprite加载成功");
|
// Debug.Log("sprite加载成功");
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
Debug.Log("sprite加载失败,当前文件夹未找到");
|
// Debug.Log("sprite加载失败,当前文件夹未找到");
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// toggle变大
|
/// toggle变大
|
||||||
|
|
|
||||||
|
|
@ -123,8 +123,8 @@ public class UI_TopTitlePanel : BasePanel
|
||||||
Bootstrap.Instance.uiManager.ShowPanel<UI_TopTitlePanel>(this, E_UI_Layer.Top, (panel) =>
|
Bootstrap.Instance.uiManager.ShowPanel<UI_TopTitlePanel>(this, E_UI_Layer.Top, (panel) =>
|
||||||
{
|
{
|
||||||
Bootstrap.Instance.uiManager.HidePanel<UI_LoginPanel>();
|
Bootstrap.Instance.uiManager.HidePanel<UI_LoginPanel>();
|
||||||
Bootstrap.Instance.uiManager.HidePanel< UI_TopTipPanel>();
|
Bootstrap.Instance.uiManager.HidePanel<UI_TopTipPanel>();
|
||||||
Bootstrap.Instance.uiManager.HidePanel< UI_ExperimentChooesPanel>();
|
Bootstrap.Instance.uiManager.HidePanel<UI_ExperimentChooesPanel>();
|
||||||
Debug.Log("场景加载成功");
|
Debug.Log("场景加载成功");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue