Init(args)
Scripting Reference
Loading...
Searching...
No Matches

◆ InitInEditModeAttribute() [3/3]

Sisus.Init.InitInEditModeAttribute.InitInEditModeAttribute ( From first,
From second,
From third = defaultFrom,
From fourth = defaultFrom,
From fifth = defaultFrom,
From sixth = defaultFrom )

When a component that derives from MonoBehaviour<> and has the InitInEditModeAttribute 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.

Parameters
firstDefines where to search when trying to retrieve the first argument accepted by the attribute holder.
secondDefines where to search when trying to retrieve the second argument accepted by the attribute holder.
thirdDefines where to search when trying to retrieve the third argument accepted by the attribute holder.
fourthDefines where to search when trying to retrieve the fourth argument accepted by the attribute holder.
fifthDefines where to search when trying to retrieve the fifth argument accepted by the attribute holder.
sixthDefines where to search when trying to retrieve the sixth argument accepted by the attribute holder.