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

Method getComponentInfo

packages/core/src/Plugins/DebugPlugin.ts:256–270  ·  view source on GitHub ↗

* 获取组件调试信息

(component: any)

Source from the content-addressed store, hash-verified

254 * 获取组件调试信息
255 */
256 private getComponentInfo(component: any): ComponentDebugInfo {
257 const type = component.constructor.name;
258 const data: any = {};
259
260 for (const key of Object.keys(component)) {
261 if (!key.startsWith('_')) {
262 const value = component[key];
263 if (typeof value !== 'function') {
264 data[key] = value;
265 }
266 }
267 }
268
269 return { type, data };
270 }
271
272 /**
273 * 查询实体

Callers 1

getEntityInfoMethod · 0.95

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected