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

Method onDestroy

packages/fairygui/src/ecs/FGUIUpdateSystem.ts:186–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

184 }
185
186 protected override onDestroy(): void {
187 const renderSystem = getFGUIRenderSystem();
188 if (renderSystem && this.scene) {
189 for (const entity of this.scene.entities.buffer) {
190 const fguiComp = entity.getComponent(FGUIComponent) as FGUIComponent | null;
191 if (fguiComp) {
192 renderSystem.unregisterComponent(fguiComp);
193 }
194 }
195 }
196
197 this._pendingLoads.clear();
198 this._trackedStates = new WeakMap();
199 }
200}

Callers

nothing calls this directly

Calls 4

getFGUIRenderSystemFunction · 0.90
clearMethod · 0.65
getComponentMethod · 0.45
unregisterComponentMethod · 0.45

Tested by

no test coverage detected