国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Unity的Scene之間如何傳遞數(shù)據(jù),成為UP主的第777天留念。

2022-02-01 01:51 作者:不想努力了工作室  | 我要投稿

寫一個Static的Singleton的class,數(shù)據(jù)存里面就可以了。別忘了加DontDestroyOnLoad(this.gameObject);

例子:

public class PlayerDataSingleton : MonoBehaviour

{

? ? public static PlayerDataSingleton instance;

? ? public int anyData;


? ? private void Awake()

? ? {

? ? ? ? instance = this;

? ? ? ? DontDestroyOnLoad(this.gameObject);

? ? }

}



Unity的Scene之間如何傳遞數(shù)據(jù),成為UP主的第777天留念。的評論 (共 條)

分享到微博請遵守國家法律
屏东市| 扎赉特旗| 田阳县| 雷山县| 镇宁| 榕江县| 安丘市| 额敏县| 安溪县| 北辰区| 土默特左旗| 收藏| 吉安县| 新源县| 阳原县| 济南市| 尉犁县| 竹山县| 迭部县| 富源县| 乳山市| 四子王旗| 横山县| 康乐县| 和田县| 洮南市| 卓尼县| 徐汇区| 拉萨市| 城步| 原阳县| 绥阳县| 天镇县| 米泉市| 乃东县| 得荣县| 高清| 奉新县| 汤阴县| 溆浦县| 浮梁县|