コード例 #1
0
 public override void OnApplicationStart()
 {
     Instance = this;
     Config.RegisterSettings();
     OnPreferencesSaved();
     AvatarHiderPlayer.Init();
     PlayerManager.Init();
     RefreshManager.Init();
     Config.OnConfigChange();
 }
コード例 #2
0
ファイル: PlayerManager.cs プロジェクト: loukylor/VRC-Mods
        private static void OnAvatarChanged(VRCAvatarManager manager, GameObject gameObject)
        {
            int photonId = manager.field_Private_VRCPlayer_0.prop_PlayerNet_0.prop_PhotonView_0.field_Private_Int32_0;

            if (!players.ContainsKey(photonId))
            {
                return;
            }

            players[photonId].SetAvatar(gameObject);
            if (filteredPlayers.ContainsKey(photonId))
            {
                RefreshManager.RefreshPlayer(players[photonId], Player.prop_Player_0.transform.position);
            }
            else
            if (Config.IncludeHiddenAvatars.Value && players[photonId].isHidden)
            {
                players[photonId].SetInActive();
            }
        }
コード例 #3
0
 public override void OnUpdate()
 {
     // About 50-100 microseconds (0.05 - 0.1 milliseconds) per refresh in instance of ~20 people;
     RefreshManager.Refresh();
 }