赞
踩
using System.Collections; using System.Collections.Generic; using UnityEngine; public class xiaohui : MonoBehaviour { public object Instance { get; private set; } // Start is called before the first frame update private void Awake() { if (Instance != null) Destroy(gameObject); else { Instance = this; DontDestroyOnLoad(gameObject); } } }
脚本挂在过场景不想被销毁的物体上
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。