protected override IEnumerator SetUp()
    {
        yield return(base.SetUp());

        TestHelpers.CreateSceneEntity(scene, ENTITY_ID);

        TestHelpers.CreateAndSetShape(scene, ENTITY_ID, DCL.Models.CLASS_ID.GLTF_SHAPE, JsonConvert.SerializeObject(
                                          new
        {
            src = TestAssetsUtils.GetPath() + "/GLB/Trunk/Trunk.glb"
        }));

        LoadWrapper gltfShape = GLTFShape.GetLoaderForEntity(scene.entities[ENTITY_ID]);

        yield return(new DCL.WaitUntil(() => gltfShape.alreadyLoaded));

        outlinerController = new BIWOutlinerController();
        entityHandler      = new BIWEntityHandler();

        var referencesController = BIWTestHelper.CreateReferencesControllerWithGenericMocks(
            outlinerController,
            entityHandler
            );

        outlinerController.Init(referencesController);
        entityHandler.Init(referencesController);

        entityHandler.EnterEditMode(scene);
        outlinerController.EnterEditMode(scene);

        entity = entityHandler.GetConvertedEntity(scene.entities[ENTITY_ID]);
    }
    protected override IEnumerator SetUp()
    {
        yield return(base.SetUp());

        TestHelpers.CreateSceneEntity(scene, ENTITY_ID);
        biwActionController  = new BIWActionController();
        entityHandler        = new BIWEntityHandler();
        biwFloorHandler      = new BIWFloorHandler();
        biwCreatorController = new BIWCreatorController();

        var referencesController = BIWTestHelper.CreateReferencesControllerWithGenericMocks(
            biwActionController,
            entityHandler,
            biwFloorHandler,
            biwCreatorController
            );

        biwActionController.Init(referencesController);
        entityHandler.Init(referencesController);
        biwFloorHandler.Init(referencesController);
        biwCreatorController.Init(referencesController);

        biwActionController.EnterEditMode(scene);
        entityHandler.EnterEditMode(scene);
        biwFloorHandler.EnterEditMode(scene);
        biwCreatorController.EnterEditMode(scene);
    }
    protected override IEnumerator SetUp()
    {
        yield return(base.SetUp());

        entityHandler = new BIWEntityHandler();
        entityHandler.Init(BIWTestHelper.CreateMockUpReferenceController());

        TestHelpers.CreateSceneEntity(scene, ENTITY_ID);
        entityHandler.EnterEditMode(scene);
        entity = entityHandler.GetAllEntitiesFromCurrentScene().FirstOrDefault();
    }
    protected override IEnumerator SetUp()
    {
        yield return(base.SetUp());

        entityHandler = new BIWEntityHandler();
        entityHandler.Init(BIWTestHelper.CreateMockUpReferenceController());
        entityHandler.EnterEditMode(scene);

        dummyGameObject = new GameObject();
        biwBridge       = Utils.GetOrCreateComponent <BuilderInWorldBridge>(dummyGameObject);

        WebInterface.OnMessageFromEngine += MessageReceived;
    }
Пример #5
0
    public static BIWEntity CreateSmartItemEntity(BIWEntityHandler entityHandler, ParcelScene scene, SmartItemComponent.Model model = null)
    {
        if (model == null)
        {
            model = new SmartItemComponent.Model();
        }

        BIWEntity entity = entityHandler.CreateEmptyEntity(scene, Vector3.zero, Vector3.zero);

        scene.EntityComponentCreateOrUpdateWithModel(entity.rootEntity.entityId, CLASS_ID_COMPONENT.SMART_ITEM, model);

        return(entity);
    }
 private void CreateControllers()
 {
     outlinerController = new BIWOutlinerController();
     inputHandler       = new BIWInputHandler();
     publishController  = new BIWPublishController();
     creatorController  = new BIWCreatorController();
     modeController     = new BIWModeController();
     floorHandler       = new BIWFloorHandler();
     entityHandler      = new BIWEntityHandler();
     actionController   = new BIWActionController();
     saveController     = new BIWSaveController();
     inputWrapper       = new BIWInputWrapper();
     raycastController  = new BIWRaycastController();
     gizmosController   = new BIWGizmosController();
 }
    protected override IEnumerator SetUp()
    {
        yield return(base.SetUp());

        biwCreatorController = new BIWCreatorController();
        entityHandler        = new BIWEntityHandler();
        var referencesController = BIWTestHelper.CreateReferencesControllerWithGenericMocks(
            entityHandler,
            biwCreatorController
            );

        biwCreatorController.Init(referencesController);
        entityHandler.Init(referencesController);

        entityHandler.EnterEditMode(scene);
        biwCreatorController.EnterEditMode(scene);
    }