feat!: GetRequiredBehaviour/HierarchyObject methods added for cleaner null handling

This commit is contained in:
2025-04-13 12:52:27 +03:00
parent bfbcfdce4f
commit 86b8cd9b55
21 changed files with 140 additions and 73 deletions

View File

@@ -14,10 +14,10 @@ public class BehaviourControllerFactory
T behaviourController = TypeFactory.Get<T>(args);
if (!hierarchyObject.Assign(behaviourController))
throw AssignException.From(hierarchyObject, behaviourController);
throw AssignFailedException.From(hierarchyObject, behaviourController);
if (!behaviourController.Assign(hierarchyObject))
throw AssignException.From(behaviourController, hierarchyObject);
throw AssignFailedException.From(behaviourController, hierarchyObject);
return behaviourController;
}