fix(ecs): add entity field to COMPONENT_ADDED event (#396)
Fix missing entity field in COMPONENT_ADDED event payload that caused ECSRoom's @NetworkEntity auto-broadcast to fail with 'Cannot read properties of undefined'
This commit is contained in:
@@ -478,6 +478,7 @@ export class Entity {
|
||||
this.scene.eventSystem.emitSync(ECSEventType.COMPONENT_ADDED, {
|
||||
timestamp: Date.now(),
|
||||
source: 'Entity',
|
||||
entity: this,
|
||||
entityId: this.id,
|
||||
entityName: this.name,
|
||||
entityTag: this.tag?.toString(),
|
||||
|
||||
Reference in New Issue
Block a user