Exemplo n.º 1
0
    public bool SelectEntity(DCLBuilderInWorldEntity entityEditable)
    {
        if (entityEditable.IsLocked)
        {
            return(false);
        }

        if (entityEditable.IsSelected)
        {
            return(false);
        }

        entityEditable.Select();

        selectedEntities.Add(entityEditable);

        currentActiveMode?.SelectedEntity(entityEditable);

        if (HUDController.i.builderInWorldMainHud != null)
        {
            hudController.UpdateEntitiesSelection(selectedEntities.Count);
            hudController.ShowEntityInformation();
            hudController.EntityInformationSetEntity(entityEditable, sceneToEdit);
        }

        outlinerController.CancelAllOutlines();

        OnEntitySelected?.Invoke();

        return(true);
    }
        public void EntityInformationSetEntityCorrectly()
        {
            // Arrange
            BIWEntity   testEntity = new BIWEntity();
            ParcelScene testScene  = new GameObject("_ParcelScene").AddComponent <ParcelScene>();

            // Act
            buildModeHUDController.EntityInformationSetEntity(testEntity, testScene);

            // Assert
            buildModeHUDController.controllers.entityInformationController.Received(1).SetEntity(testEntity, testScene);
        }