Skip to content

Add ability to auto convert a foreach loop over a query to IJobEntity #2485

@aboudekahil

Description

@aboudekahil

Basically add a code action to transform something like:

foreach(var (RefRO<ComponentA> a, RefRW<ComponentB> b, Entity entity) in SystemAPI.Query<RefRO<ComponentA>, RefRW<ComponentB>>().WithEntityAccess() {
    ...
}

to

internal partial struct JOB_NAME: IJobEntity {
    private void Execute(in ComponentA a, ref ComponentB b, Entity entity) {
        ...
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions