Burst/Jobs and ECS - Example Anywhere?

Hello, I just got the new version of the package, are there samples on how to use it inside BURST/ECS?
I have found the follower entity script, and copied the components from there:

        ecb.AddComponent(entity, this.movement);
        autoRepathBacking.Reset();
        ecb.AddComponent(entity, autoRepathBacking);
        ecb.AddComponent(entity, new MovementControl() { });
        ecb.AddComponent(entity, managedState);
        ecb.AddComponent(entity, new SearchState() { });
        ecb.AddComponent(entity, new MovementStatistics()
        {
            lastPosition = pos,
            estimatedVelocity = float3.zero,
        });
        ecb.AddComponent(entity, this.shape);
        ecb.AddComponent(entity, new ResolvedMovement());
        ecb.AddComponent(entity, new DestinationPoint
        {
            destination = new float3(float.PositiveInfinity, float.PositiveInfinity, float.PositiveInfinity),
        });
        ecb.AddComponent(entity, new AgentMovementPlane(this.transform.rotation));
        ecb.AddComponent<SimulateMovement>(entity);
        ecb.AddComponent<SimulateMovementRepair>(entity);
        ecb.AddComponent<SimulateMovementControl>(entity);
        ecb.AddComponent<SimulateMovementFinalize>(entity);
        ecb.AddComponent<SyncPositionWithTransform>(entity);
        ecb.AddComponent<SyncRotationWithTransform>(entity);
        ecb.AddSharedComponent(entity, new AgentMovementPlaneSource { value = movementPlaneSourceBacking });

        if (managedState.enableGravity)
            ecb.AddComponent(entity, new GravityState() { });


        if (!managedState.pathTracer.isCreated)
        {
            managedState.pathTracer = new PathTracer(Allocator.Persistent);
        }

But when I make the SetPosition to any value, the entity does not move at all, and I cant seem to figure out what exactly I am doing wrong. The debug gizmos show the correct path, but there is no movement. I tried adding the SyncTransform , even though I am not using GO on this entity. But to no avail.

EDIT: So for some reason is SCALE is set to 0 in LocalTransform (or something that not one) the entity does not move… changing it to one does fix it, looks like. Havent figured out why yet though…

i’m also interested in a sample project that uses the a* pathfinding in an ECS project.

Hi

The agent will scale its movement speed, and several other values, by the entity’s scale. So if the scale is zero, it is expected that it will not move.

Some other people have made a custom baking script: Current state and plans for ECS integration? - #25 by aron_granberg

Yeah, after finding the scale issue all worked fine - expect that gravity keeps being constantly applied for some reason, but I can sort that myself :slight_smile: