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

◆ Instantiate< TObject >() [2/2]

static TObject Sisus.Init.Reflection.InstantiateExtensions.Instantiate< TObject > ( [DisallowNull] this TObject original,
[DisallowNull] params object[] arguments )
static

Clones the original TObject , initializes it with the given argument and then returns the clone.

Template Parameters
TObjectType of the Object that is being cloned.
Parameters
argumentsZero or more values to set.
Returns
The added component.
Exceptions
ArgumentNullExceptionThrown if this GameObject is null.
MissingMemberExceptionThrown if no field or property with one of the provided name names was found on the client class TObject , or if a field or property was found but a value of type TValue is not assignable to it.
Type Constraints
TObject :Object