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

◆ memberName

object this[[DisallowNull] string Sisus.Init.MonoBehaviour< TFirstArgument, TSecondArgument, TThirdArgument >.memberName
setprotected

Assigns an argument received during initialization to a field or property by the memberName given name.

Because reflection is used to set the value it is possible to use this to assign to init only fields and properties. Properties that do not have a set accessor and are not auto-implemented are not supported however.

Parameters
memberNameName of the field or property to which to assign the value.
Exceptions
InvalidOperationExceptionThrown if this method is called outside of the context of the client object being initialized.
ArgumentNullExceptionThrown if the provided memberName is null.
MissingMemberExceptionThrown if no field or property by the provided name is found or if property by given name is not auto-implemented and does not have a set accessor.