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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

ITriggerEventsJob questions

Discussion in 'Physics for ECS' started by felipin, Dec 15, 2019.

  1. felipin


    Nov 18, 2015
    Is there any concept like "every TriggerEvent created from a PhysicsShape is processed at the same thread"? If I wanna change a component from my trigger entity, is there any safe way to do it?
  2. Ryuuguu


    Apr 14, 2007
    What I did was fill a hashmap <Entity,dataneededForChange> in the ITriggerEventsJob and then in a second job of type withEntityJob checked the hashMap[entity] and made the changes there. Since they were all SetComponentData I was able to this all in the second job on multiple threads.