/// <summary>
/// 存数据
/// </summary>
public class cwq_CunShuJu : MonoBehaviour
{
public static cwq_CunShuJu _CunShuJu;
private void Awake()
{
_CunShuJu = this;
}
public static int mulu;
// Start is called before the first frame update
void Start()
{
DontDestroyOnLoad(this.gameObject);
}
// Update is called once per frame
void Update()
{
}
}
///调用方法 加载场景的时候传送
public void SetLoadScene(string s)
{
SceneManager.LoadScene(s);
cwq_CunShuJu.mulu = 1;
}
unity 场景a数据传送到场景b
最新推荐文章于 2023-09-12 01:11:57 发布