Skip to content

ECS Framework API v2.1.50


ECS Framework API / ComponentDataCollector

Class: ComponentDataCollector

Defined in: Utils/Debug/ComponentDataCollector.ts:9

组件数据收集器

Constructors

Constructor

new ComponentDataCollector(): ComponentDataCollector

Returns

ComponentDataCollector

Methods

clearCache()

static clearCache(): void

Defined in: Utils/Debug/ComponentDataCollector.ts:269

Returns

void


collectComponentData()

collectComponentData(scene?): IComponentDebugData

Defined in: Utils/Debug/ComponentDataCollector.ts:16

收集组件数据(轻量版,不计算实际内存大小)

Parameters

scene?

场景实例

null | IScene

Returns

IComponentDebugData


calculateDetailedComponentMemory()

calculateDetailedComponentMemory(typeName, scene?): number

Defined in: Utils/Debug/ComponentDataCollector.ts:174

为内存快照功能提供的详细内存计算 只在用户主动请求内存快照时调用

Parameters

typeName

string

组件类型名称

scene?

场景实例

null | IScene

Returns

number

Released under the MIT License.