25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
-
- public class GameData : MonoBehaviour
- {
- public static GameData Instance { get; private set; }
-
- //public string username = "游客";
- public string appleUserId = "123";
- /// <summary>
- /// 是否是游客
- /// </summary>
- public bool isYouke;
-
- private void Awake()
- {
- // 确保全局唯一
- if (Instance != null && Instance != this)
- {
- Destroy(gameObject);
- return;
- }
- Instance = this;
- DontDestroyOnLoad(gameObject); // 场景切换不销毁
- }
- }
|