# Function: onBackpackItemCustomDataUpdate

onBackpackItemCustomDataUpdate(handler: BackpackItemCustomDataUpdateEventHandler): void

注册 背包物品自定义信息变更 事件处理函数

example

import { backpackSystem } from '@timi/mogs-sdk';

backpackSystem.onBackpackItemCustomDataUpdate((event) => {
   console.log(event.id, event.typeId, event.backpackId, event.position);
   console.log('物品自定义数据变更前后的值:', event.previousValue, event.currentValue);
}
});
1
2
3
4
5
6
7

# 参数:

属性 类型
handler BackpackItemCustomDataUpdateEventHandler

# 返回值:

void