Example #1
0
    public void DeselectEntity(DCLBuilderInWorldEntity entity)
    {
        if (!selectedEntities.Contains(entity))
        {
            return;
        }

        if (!DCL.Environment.i.world.sceneBoundsChecker.IsEntityInsideSceneBoundaries(entity.rootEntity))
        {
            DestroyLastCreatedEntities();
        }

        DCL.Environment.i.world.sceneBoundsChecker.EvaluateEntityPosition(entity.rootEntity);
        DCL.Environment.i.world.sceneBoundsChecker.RemoveEntityToBeChecked(entity.rootEntity);

        entity.Deselect();

        outlinerController.CancelEntityOutline(entity);
        selectedEntities.Remove(entity);
        currentActiveMode?.EntityDeselected(entity);
        if (selectedEntities.Count <= 0 &&
            hudController != null)
        {
            hudController.HideEntityInformation();
        }
    }
Example #2
0
        public void HideEntityInformationCorrectly()
        {
            // Act
            buildModeHUDController.HideEntityInformation();

            // Assert
            buildModeHUDController.controllers.entityInformationController.Received(1).Disable();
        }
Example #3
0
    public void DeselectEntity(DCLBuilderInWorldEntity entity)
    {
        if (!selectedEntities.Contains(entity))
        {
            return;
        }

        entity.Deselect();

        outlinerController.CancelEntityOutline(entity);
        selectedEntities.Remove(entity);
        hudController?.UpdateEntitiesSelection(selectedEntities.Count);
        currentActiveMode?.EntityDeselected(entity);
        if (selectedEntities.Count <= 0 &&
            hudController != null)
        {
            hudController.HideEntityInformation();
        }

        OnEntityDeselected?.Invoke(entity);
    }
        public void HideEntityInformationCorrectly()
        {
            // Act
            buildModeHUDController.HideEntityInformation();

            // Assert
            buildModeHUDController.controllers.entityInformationController.Received(1).Disable();
            buildModeHUDController.controllers.catalogBtnController.Received(1).SetActive(true);

            if (buildModeHUDController.isCatalogOpen)
            {
                buildModeHUDController.controllers.sceneCatalogController.Received(1).SetActive(true);
            }
        }