public override void OnApplicationStart() { Instance = this; Config.RegisterSettings(); OnPreferencesSaved(); AvatarHiderPlayer.Init(); PlayerManager.Init(); RefreshManager.Init(); Config.OnConfigChange(); }
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(); } }
public override void OnUpdate() { // About 50-100 microseconds (0.05 - 0.1 milliseconds) per refresh in instance of ~20 people; RefreshManager.Refresh(); }