Init(args)
Scripting Reference
List of all members | Public Member Functions | Public Attributes
Sisus.Init.InitOnResetAttribute Class Reference

Description

When a component that derives from MonoBehaviour<> and has the InitOnResetAttribute is first added to a GameObject in the editor, or when the user hits the Reset button in the Inspector's context menu, the arguments accepted by the component are automatically gathered and passed to its IInitializable<>.Init function.

This auto-initialization behaviour only occurs in edit mode during the Reset event function and is meant to make it more convenient to add components without needing to assign all Object references manually through the inspector.

Inherits Attribute.

Public Member Functions

 InitOnResetAttribute ()
 When a component that derives from MonoBehaviour<> and has the InitOnResetAttribute is first added to a GameObject in the editor, or when the user hits the Reset button in the Inspector's context menu, the arguments accepted by the component are automatically gathered and passed to its IInitializable<>.Init function. More...
 
 InitOnResetAttribute (From search=defaultFrom)
 When a component that derives from MonoBehaviour<> and has the InitOnResetAttribute is first added to a GameObject in the editor, or when the user hits the Reset button in the Inspector's context menu, the arguments accepted by the component are automatically gathered and passed to its IInitializable<>.Init function. More...
 
 InitOnResetAttribute (From first, From second, From third=defaultFrom, From fourth=defaultFrom, From fifth=defaultFrom)
 When a component that derives from MonoBehaviour<> and has the InitOnResetAttribute is first added to a GameObject in the editor, or when the user hits the Reset button in the Inspector's context menu, the arguments accepted by the component are automatically gathered and passed to its IInitializable<>.Init function. More...
 

Public Attributes

readonly From first
 Defines where to search when trying to retrieve the first dependency of the attribute holder. More...
 
readonly From second
 Defines where to search when trying to retrieve the second dependency of the attribute holder. More...
 
readonly From third
 Defines where to search when trying to retrieve the third dependency of the attribute holder. More...
 
readonly From fourth
 Defines where to search when trying to retrieve the fourth dependency of the attribute holder. More...
 
readonly From fifth
 Defines where to search when trying to retrieve the fifth dependency of the attribute holder. More...