Forging Station | Spawn Grid Of Entities In Jobs Context - Fast!! - Unity ECS/DOTS @ForgingStation | Uploaded August 2020 | Updated October 2024, 2 hours ago.
In this short video, we will look at one of the simplest ways to spawn entities from within (parallel) Jobs context - in a grid pattern
We will be using Entity Command Buffer to record all the structural changes and playback all the events in the predefined sync point.
We will build upon this when we develop the DOTS Navigation (NavMeshQUery) system.
I have kept the explanation as simple as possible with regards to Burst compiler and Entity Command Buffer. Please go through the Unity Documentation if you need to know more - especially about command buffers as they are extremely helpful and also a very good practice to follow.
Performing structural changes using Command buffers enables us to use burst compiler even on the main thread if need be. Synchronous compilation attribute not only works before frame-0 but in general it is used to make sure the burst compilation happens before the job is scheduled. If not, normally it would happen asynchronously - loosely speaking during the gameplay.
In this short video, we will look at one of the simplest ways to spawn entities from within (parallel) Jobs context - in a grid pattern
We will be using Entity Command Buffer to record all the structural changes and playback all the events in the predefined sync point.
We will build upon this when we develop the DOTS Navigation (NavMeshQUery) system.
I have kept the explanation as simple as possible with regards to Burst compiler and Entity Command Buffer. Please go through the Unity Documentation if you need to know more - especially about command buffers as they are extremely helpful and also a very good practice to follow.
Performing structural changes using Command buffers enables us to use burst compiler even on the main thread if need be. Synchronous compilation attribute not only works before frame-0 but in general it is used to make sure the burst compilation happens before the job is scheduled. If not, normally it would happen asynchronously - loosely speaking during the gameplay.