static private bool SpawnPlayerObject()
        {
            var playerInstance = SpawnFromPrefab(playerPrefabPath);

            if (!playerInstance)
            {
                return(false);
            }

            var playerCtrl = playerInstance.GetComponent <PlayerControl>();

            if (!playerCtrl)
            {
                Iwlog.Error("PlayerPrefab must have PlayerControl component");
                return(false);
            }
            LocalPlayerContext.SetLocalPlayer(playerCtrl);

            Setup_VRC_UiShape(playerCtrl.PlayerCamera.GetComponent <Camera>());

            SetupQuickMenu(playerCtrl);

            LocalPlayerContext.MovePlayerToSpawnLocation();

            return(true);
        }
Beispiel #2
0
 public void ExecuteRespawn()
 {
     LocalPlayerContext.MovePlayerToSpawnLocation();
 }
Beispiel #3
0
 public void SetColliderActive_PlayerLayer(bool b)
 {
     LocalPlayerContext.ChangeColliderSetup("PlayerLayer", b);
 }