MCPcopy Create free account
hub / github.com/esengine/esengine / getSceneByEntityId

Function getSceneByEntityId

packages/core/src/ECS/Core/ReferenceTracker.ts:75–78  ·  view source on GitHub ↗
(entityId: number)

Source from the content-addressed store, hash-verified

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

Callers 1

EntityRefFunction · 0.90

Calls 2

getMethod · 0.65
derefMethod · 0.65

Tested by

no test coverage detected