Version: Unity 6.5 (6000.5)
LanguageEnglish
  • C#

LifecycleMethodRegistration

class in Unity.Scripting.LifecycleManagement.CodeGen

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Infrastructure class used by generated code to register lifecycle callback methods. Not intended for direct use.

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.LifecycleMethodRegistration in generated subclasses; do not call it directly.

Additional resources: OnCodeLoadedAttribute, OnCodeInitializingAttribute, OnCodeDeinitializingAttribute, OnCodeUnloadingAttribute.