Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

ComponentGroup.SetFilter inside Job

Discussion in 'Entity Component System' started by Spy-Shifty, Sep 16, 2018.

  1. Spy-Shifty

    Spy-Shifty

    Joined:
    May 5, 2011
    Posts:
    546
    Hi,

    is where a way to filter SharedComponentData within a job?

    In my specific job I want to filter for an component but the filter value is a result of a calculation inside the job.
     
  2. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
    Yes, using ArchetypeChunk. You have to pass the available SharedComponentData values to the job to be able to map the value you want to filter to the SharedComponentData index of the ArchetypeChunk.
     
  3. Spy-Shifty

    Spy-Shifty

    Joined:
    May 5, 2011
    Posts:
    546
    Thank you,
    I'll try to implement this later this week!