(entityId: number)
| 73 | * @returns Scene实例,如果不存在则返回null |
| 74 | */ |
| 75 | export function getSceneByEntityId(entityId: number): IScene | null { |
| 76 | const sceneRef = globalEntitySceneMap.get(entityId); |
| 77 | return sceneRef?.deref() || null; |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Entity引用追踪器 |