Default Variable Movement Field is now Optional
This commit is contained in:
parent
cda057ebeb
commit
c4edfef458
|
@ -92,6 +92,9 @@ namespace Syntriax.Modules.Movement.Config
|
|||
foreach (string monoBehaviours in definition.MonoBehaviours)
|
||||
MovementFactory.Instance.AddToGameObject(gameObject, monoBehaviours);
|
||||
|
||||
if (string.IsNullOrEmpty(definition.DefaultVariableMovement))
|
||||
return;
|
||||
|
||||
IVariableMovementController variableMovementController = gameObject.GetComponent<IVariableMovementController>();
|
||||
VMCollection collection = VariableMovementFactory.Instance.Collections[definition.DefaultVariableMovement];
|
||||
variableMovementController?.LoadVariableMovementCollection(collection);
|
||||
|
|
Loading…
Reference in New Issue