using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class testMusice : MonoBehaviour
{
private static testMusice instance = null;
public static testMusice Instance
{
get { return instance; }
}
void Awake()
{
if (instance != null && instance != this)
{
Destroy(this.gameObject);
return;
}
else
{
instance = this;
}
DontDestroyOnLoad(this.gameObject);//使对象目标在加载新场景时不被自动销毁。
}
//public void onChangeSceneButtonClicked()
//{
//changeScene("scene3");
// }
//切换场景
public void start(int Scene)
{
SceneManager.LoadScene(Scene);
}
}