// ref state
query = new EntityQueryBuilder(Allocator.Temp).WithAll<T>().Build(ref state),
// in update
var gameStateQuery = SystemAPI.QueryBuilder().WithAllRW<GameState>().Build();
// entity manager
query = EntityManager.CreateEntityQuery(ComponentType.ReadOnly<SyncTransfer>());
query = EntityManager.CreateEntityQuery(new EntityQueryBuilder...);
using var query =
state.EntityManager.CreateEntityQuery(new EntityQueryBuilder(Allocator.Temp)
.WithAll<PrefabId>());
linkedEntityGroupLookup = state.GetBufferLookup<LinkedEntityGroup>();
var bow = state.Instantiate(PrefabType.Bow);
state.AddComponent(bow, LocalTransform.FromPosition(math.up()));
state.SetParentWithLookup(bow, hero, ref linkedEntityGroupLookup);
EntityCommandBuffer.SetBuffer
EntityCommandBuffer.SetBuffer 会重置 Buffer , 是 Bug 吗? ecb 没法取得 buffer, 需要使用 SystemAPI 或者 EntityManager