首先是整体的游戏场景,本次场景是一个跑酷游戏
附上UI场景结构 ,GM为节点。
GM代码为
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class GM : MonoBehaviour
{
public GameObject panel; //此处panel是UI列表中的panel,需要挂上节点
void Start()
{
panel.SetActive(false); //将panel设置为false,默认不显示
}
void Update()
{