Add component by constructor (with optional partial data) 通过构造函数添加(可选partial数据)
Optional
partial: Partial<T>Add component by typeId (for network/editor data) 通过typeId添加(如:网络/编辑器数据) Will try to use constructor to instantiate and fill with init data 会尝试用构造函数实例化并填充init数据
Optional
init: Record<string, unknown>Add component using existing instance (derives typeId from instance.constructor) 直接用现成实例添加(会从实例的constructor推导typeId)
Immediately request ID from EM; component and state changes still applied in flush() 立即从EM申请ID;组件与状态变更仍在flush时统一应用
Destroy entity (terminates all other operations on this entity) 销毁实体(终止一切对该实体的其它操作)
Apply all operations to world (recommended to call at frame end) 应用到世界(建议帧末调用)
Remove component by constructor 通过构造函数移除组件
Remove component by typeId 通过typeId移除组件
Set enabled state (last write wins) 设置启用状态(最后一次写生效)
Command buffer for deferred entity and component operations 延迟实体和组件操作的命令缓冲区