feat!: GetRequiredBehaviour/HierarchyObject methods added for cleaner null handling
This commit is contained in:
@@ -15,12 +15,12 @@ public class BehaviourFactory
|
||||
|
||||
stateEnable ??= TypeFactory.Get<StateEnable>();
|
||||
if (!stateEnable.Assign(behaviour))
|
||||
throw AssignException.From(stateEnable, behaviour);
|
||||
throw AssignFailedException.From(stateEnable, behaviour);
|
||||
|
||||
if (!behaviour.Assign(stateEnable))
|
||||
throw AssignException.From(behaviour, stateEnable);
|
||||
throw AssignFailedException.From(behaviour, stateEnable);
|
||||
if (!behaviour.Assign(hierarchyObject.BehaviourController))
|
||||
throw AssignException.From(behaviour, hierarchyObject.BehaviourController);
|
||||
throw AssignFailedException.From(behaviour, hierarchyObject.BehaviourController);
|
||||
|
||||
return behaviour;
|
||||
}
|
||||
|
Reference in New Issue
Block a user