ECS Framework API / SerializeAsMap
Function: SerializeAsMap()
SerializeAsMap(): (
target,propertyKey) =>void
Defined in: packages/core/src/ECS/Serialization/SerializationDecorators.ts:147
Map序列化装饰器
专门用于序列化Map类型字段
Returns
(
target,propertyKey):void
Parameters
target
any
propertyKey
string | symbol
Returns
void
Example
typescript
@SerializeAsMap()
inventory: Map<string, number> = new Map();