#none

1 messages · Page 1 of 1 (latest)

hollow topaz
#

No hate, however I do need to note that using

var entities = boulderQuery.ToEntityArray(Allocator.Temp);
            var healths = boulderQuery.ToComponentDataArray<HealthCD>(Allocator.Temp);
            var objectDatas = boulderQuery.ToComponentDataArray<ObjectDataCD>(Allocator.Temp);

Will cause a significant slowdown compared to using SystemAPI.Query or Entities.ForEach.

Additionally I want to note that your code doesn't account for the vast majority of boulders, which are far from players. They are not iterated by default because doing so will cause even bigger performance issues.

Also you can finetune your ECS query to not have to filter by object id. Currently you're asking every entity if it is a boulder, which is extremely inefficient.

lethal moss
#

@hollow topazThanks, master, I think the best thing is to delete it!

hollow topaz
#

Well that's definitely not my intention with this

#

But you have a lot to improve here