public void DeactivateGameObjectsWhenVisibilityIsSetToFalse()
        {
            Assert.IsTrue(toggledGameObject.activeSelf);

            visibility.SetVisibility("Caller1", true);
            visibility.SetVisibility("Caller2", false);
            Assert.IsFalse(toggledGameObject.activeSelf);
        }
    public override void ApplyModifier(GameObject avatar)
    {
        AvatarVisibility avatarVisibility = avatar.GetComponent <AvatarVisibility>();

        if (avatarVisibility != null)
        {
            avatarVisibility.SetVisibility(HIDE_AVATARS_MODIFIER, false);
        }
    }
    private void Update()
    {
        if (!enableCameraCheck || repositioningWorld)
        {
            return;
        }

        if (mainCamera == null)
        {
            mainCamera = Camera.main;

            if (mainCamera == null)
            {
                return;
            }
        }

        bool shouldBeVisible = Vector3.Distance(mainCamera.transform.position, transform.position) > cameraDistanceToDeactivate;

        avatarVisibility.SetVisibility("PLAYER_AVATAR_CONTROLLER", shouldBeVisible);
    }