mr.chenyuelin的博客在跳转场景的触发事件中,将背景音乐绑定的对象做成预制体,上面绑定了播放音乐的脚本test1和audioSource组件 test1.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public ...
黑狗向前跑的博客防止单例随场景销毁和跨场景两个物体脚本问题 通过泛型封装单例类 NormalSingleton.cs using System.Collections; using System.Collections.Generic; using UnityEngine; //标准单例类 public class ...