文档

Unity Engine

Unity Engine

LifecycleMethodRegistration

Infrastructure class used by generated code to register lifecycle callback methods. Not intended for direct use.
阅读时间1 分钟最后更新于 1 个月前

Definition

public static class LifecycleMethodRegistration

Remarks

This class is part of the code generation infrastructure for lifecycle attributes such as OnCodeLoadedAttribute and OnCodeInitializingAttribute. The Roslyn source generator emits calls to LifecycleMethodRegistration.Register in generated subclasses; do not call it directly.

Static Methods

Method

Description

RegisterRegisters a lifecycle callback with the lifecycle controller. Called by generated code only.