![]() |
Init(args)
Scripting Reference
|
Base class for all MonoBehaviour{T...} classes.
Extends the MonoBehaviour class with the ability to automatically try and retrieve services that the component depends on during the Awake event.
You usually want to derive from a generic MonoBehaviour{T...} class instead of this one. The exception is situations where you want to create an abstract base class, and allow types that derive from the base class implement any IInitializable{T...} interface and receive any services they need.
Protected Member Functions | |
virtual void | OnAwake () |
OnAwake is called when the script instance is being loaded during the Awake event after the InitInternal function has finished. | |
bool | Init (Context context) |
Requests the object to try and acquire all the objects that it depends on and initialize itself. | |
void | ThrowIfNull< TArgument > (TArgument argument) |
Checks if the argument is null and throws an System.ArgumentNullException if it is. | |
void | AssertNotNull< TArgument > (TArgument argument) |
Checks if the argument is null and logs an assertion message to the console if it is. | |
virtual void | ValidateArgument< TArgument > (TArgument argument) |
Method that can be overridden and used to validate the initialization arguments that were received by this object. | |
virtual void | ValidateArguments< TFirstArgument, TSecondArgument > (TFirstArgument firstArgument, TSecondArgument secondArgument) |
Method that can be overridden and used to validate the initialization arguments that were received by this object. | |
virtual void | ValidateArguments< TFirstArgument, TSecondArgument, TThirdArgument > (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument) |
Method that can be overridden and used to validate the initialization arguments that were received by this object. | |
virtual void | ValidateArguments< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument > (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument) |
Method that can be overridden and used to validate the initialization arguments that were received by this object. | |
virtual void | ValidateArguments< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument > (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument) |
Method that can be overridden and used to validate the initialization arguments that were received by this object. | |
virtual void | ValidateArguments< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument) |
Method that can be overridden and used to validate the initialization arguments that were received by this object. | |
virtual void | ValidateArguments< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument > (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument) |
Method that can be overridden and used to validate the initialization arguments that were received by this object. | |
virtual void | ValidateArguments< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument > (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument) |
Method that can be overridden and used to validate the initialization arguments that were received by this object. | |
virtual void | ValidateArguments< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument > (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument, TNinthArgument ninthArgument) |
Method that can be overridden and used to validate the initialization arguments that were received by this object. | |
virtual void | ValidateArguments< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument > (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument, TNinthArgument ninthArgument, TTenthArgument tenthArgument) |
Method that can be overridden and used to validate the initialization arguments that were received by this object. | |
virtual void | ValidateArguments< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument > (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument, TNinthArgument ninthArgument, TTenthArgument tenthArgument, TEleventhArgument eleventhArgument) |
Method that can be overridden and used to validate the initialization arguments that were received by this object. | |
virtual void | ValidateArguments< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument, TTwelfthArgument > (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument, TNinthArgument ninthArgument, TTenthArgument tenthArgument, TEleventhArgument eleventhArgument, TTwelfthArgument twelfthArgument) |
Method that can be overridden and used to validate the initialization arguments that were received by this object. | |
void | HandleValidate< TArgument > (Context context, TArgument argument) |
Handles validating the initialization argument that was received by this component, if Play Mode is active, and Null Argument Guard has been enabled for the component. | |
void | HandleValidate< TFirstArgument, TSecondArgument > (Context context, TFirstArgument firstArgument, TSecondArgument secondArgument) |
Handles validating the initialization arguments that were received by this component, if Play Mode is active, and Null Argument Guard has been enabled for the component. | |
void | HandleValidate< TFirstArgument, TSecondArgument, TThirdArgument > (Context context, TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument) |
Handles validating the initialization arguments that were received by this component, if Play Mode is active, and Null Argument Guard has been enabled for the component. | |
void | HandleValidate< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument > (Context context, TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument) |
Handles validating the initialization arguments that were received by this component, if Play Mode is active, and Null Argument Guard has been enabled for the component. | |
void | HandleValidate< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument > (Context context, TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument) |
Handles validating the initialization arguments that were received by this component, if Play Mode is active, and Null Argument Guard has been enabled for the component. | |
void | HandleValidate< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument > (Context context, TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument) |
Handles validating the initialization arguments that were received by this component, if Play Mode is active, and Null Argument Guard has been enabled for the component. | |
void | HandleValidate< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument > (Context context, TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument) |
Handles validating the initialization arguments that were received by this component, if Play Mode is active, and Null Argument Guard has been enabled for the component. | |
void | HandleValidate< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument > (Context context, TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument) |
Handles validating the initialization arguments that were received by this component, if Play Mode is active, and Null Argument Guard has been enabled for the component. | |
void | HandleValidate< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument > (Context context, TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument, TNinthArgument ninthArgument) |
Handles validating the initialization arguments that were received by this component, if Play Mode is active, and Null Argument Guard has been enabled for the component. | |
void | HandleValidate< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument > (Context context, TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument, TNinthArgument ninthArgument, TTenthArgument tenthArgument) |
Handles validating the initialization arguments that were received by this component, if Play Mode is active, and Null Argument Guard has been enabled for the component. | |
void | HandleValidate< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument > (Context context, TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument, TNinthArgument ninthArgument, TTenthArgument tenthArgument, TEleventhArgument eleventhArgument) |
Handles validating the initialization arguments that were received by this component, if Play Mode is active, and Null Argument Guard has been enabled for the component. | |
void | HandleValidate< TFirstArgument, TSecondArgument, TThirdArgument, TFourthArgument, TFifthArgument, TSixthArgument, TSeventhArgument, TEighthArgument, TNinthArgument, TTenthArgument, TEleventhArgument, TTwelfthArgument > (Context context, TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument, TFourthArgument fourthArgument, TFifthArgument fifthArgument, TSixthArgument sixthArgument, TSeventhArgument seventhArgument, TEighthArgument eighthArgument, TNinthArgument ninthArgument, TTenthArgument tenthArgument, TEleventhArgument eleventhArgument, TTwelfthArgument twelfthArgument) |
Handles validating the initialization arguments that were received by this component, if Play Mode is active, and Null Argument Guard has been enabled for the component. | |
Properties | |
static NullExtensions.NullComparer | Null [get] |
A value against which any object can be compared to determine whether or not it is null or an UnityEngine.Object which has been destroyed. | |
static NullExtensions.NullOrInactiveComparer | NullOrInactive [get] |
A value against which any object can be compared to determine whether or not it is null or an UnityEngine.Object which is inactive or has been destroyed. | |