Version: 2022.1

Events.registeredPackages

切换到手册

参数

value A PackageRegistrationEventArgs structure describing the modifications to the registered packages list.

描述

Event raised after applying changes to the registered packages list.

Occurs after the asset database is done refreshing, which is after scripts are compiled and the Domain reloaded (if necessary). When you add, update, or remove a package that contains code, a Domain Reload occurs, which resets registered event handlers. To ensure that your event handler is called, use InitializeOnLoadAttribute or InitializeOnLoadMethodAttribute to register the event handler after the Domain Reload occurs but before the event is raised.
Note: There is no guarantee that the AssetPostprocessor will finish by the time this event is raised, so don't rely on the execution order for post-processing events.

Copyright © 2020 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961