コード例 #1
0
        private void Awake()
        {
            _instance = this;

            DontDestroyOnLoad(this);

            StartCoroutine(WaitForGameData());

            ui = BSMultiplayerUI._instance;
        }
コード例 #2
0
ファイル: Plugin.cs プロジェクト: Chipaw/BeatSaberMultiplayer
 public void OnLevelWasLoaded(int level)
 {
     Console.WriteLine("Loading scene " + level);
     if (level == 1)
     {
         BSMultiplayerUI.OnLoad();
         BSMultiplayerMain.OnLoad(level);
     }
     else if (level > 1)
     {
         BSMultiplayerMain.OnLoad(level);
     }
 }
コード例 #3
0
        private void Awake()
        {
            _instance = this;

            DontDestroyOnLoad(this);

            StartCoroutine(WaitForGameData());

            ui = BSMultiplayerUI._instance;

            if (playerID == 0 || playerInfo == null)
            {
                Users.GetLoggedInUser().OnComplete((Message <User> msg) =>
                {
                    playerID   = msg.Data.ID;
                    playerName = msg.Data.OculusID;
                });
            }
        }