Example #1
0
    public void EntitySelectDeselect()
    {
        Assert.IsFalse(entity.IsSelected);
        entityHandler.SelectEntity(entity);
        Assert.IsTrue(entity.IsSelected);

        Assert.AreEqual(entityHandler.GetSelectedEntityList().Count, 1);
        Assert.AreEqual(entityHandler.GetSelectedEntityList().FirstOrDefault(), entity);

        entityHandler.DeselectEntity(entity);
        Assert.IsFalse(entity.IsSelected);
    }
Example #2
0
    public void EndMultiVoxelSelection()
    {
        List <DCLBuilderInWorldEntity> voxelEntities = builderInWorldEntityHandler.GetAllVoxelsEntities();

        foreach (DCLBuilderInWorldEntity voxelEntity in voxelEntities)
        {
            if (BuilderInWorldUtils.IsWithInSelectionBounds(voxelEntity.gameObject.transform, lastMousePosition, Input.mousePosition))
            {
                builderInWorldEntityHandler.SelectEntity(voxelEntity);
            }
        }
        outlinerController.SetOutlineCheckActive(true);
        outlinerController.CancelAllOutlines();
    }