Unity Tips
Unity Entities - System에서 Collections(NativeArray, NativeList ...) Dispose함수를 Job 이후에 실행하는 방법
Unity 2022.3.2f Entities 1.0.11 ISystem 인터페이스에 함수들에는 SystemState를 인자로 받도록 되어있는데, state의 Dependency를 활용하면 쉽게 가능합니다. public partial struct ECSExpGatherSystem : ISystem { // ... 생략 ... // public void OnUpdate(ref SystemState state) { // ... 생략 ... // var expCount = expQuery.CalculateEntityCount(); var resultExp = new NativeArray(expCount, Allocator.TempJob); var gatheringExpJobHandle = new Gatherin..