Exemplo n.º 1
0
    public DCLBuilderInWorldEntity CreateEmptyEntity(ParcelScene parcelScene, Vector3 entryPoint, Vector3 editionGOPosition, bool notifyEntityList = true)
    {
        IDCLEntity newEntity = parcelScene.CreateEntity(Guid.NewGuid().ToString());

        DCLTransform.model.position = WorldStateUtils.ConvertUnityToScenePosition(entryPoint, parcelScene);

        Vector3 pointToLookAt = Camera.main.transform.position;

        pointToLookAt.y = editionGOPosition.y;
        Quaternion lookOnLook = Quaternion.LookRotation(editionGOPosition - pointToLookAt);

        DCLTransform.model.rotation = lookOnLook;
        DCLTransform.model.scale    = newEntity.gameObject.transform.lossyScale;

        parcelScene.EntityComponentCreateOrUpdateWithModel(newEntity.entityId, CLASS_ID_COMPONENT.TRANSFORM, DCLTransform.model);

        DCLBuilderInWorldEntity convertedEntity = SetupEntityToEdit(newEntity, true);

        hudController?.UpdateSceneLimitInfo();

        if (notifyEntityList)
        {
            EntityListChanged();
        }
        return(convertedEntity);
    }
        public void UpdateSceneLimitInfoCorrectly()
        {
            // Act
            buildModeHUDController.UpdateSceneLimitInfo();

            // Assert
            buildModeHUDController.controllers.inspectorController.sceneLimitsController.Received(1).UpdateInfo();
        }