Fix
This commit is contained in:
parent
c54605a967
commit
cda057ebeb
|
@ -88,8 +88,9 @@ namespace Syntriax.Modules.Movement.Config
|
||||||
movement.BaseSpeed = movementConfig.BaseSpeed;
|
movement.BaseSpeed = movementConfig.BaseSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (string monoBehaviours in definition.MonoBehaviours)
|
if (definition.MonoBehaviours != null)
|
||||||
MovementFactory.Instance.AddToGameObject(gameObject, monoBehaviours);
|
foreach (string monoBehaviours in definition.MonoBehaviours)
|
||||||
|
MovementFactory.Instance.AddToGameObject(gameObject, monoBehaviours);
|
||||||
|
|
||||||
IVariableMovementController variableMovementController = gameObject.GetComponent<IVariableMovementController>();
|
IVariableMovementController variableMovementController = gameObject.GetComponent<IVariableMovementController>();
|
||||||
VMCollection collection = VariableMovementFactory.Instance.Collections[definition.DefaultVariableMovement];
|
VMCollection collection = VariableMovementFactory.Instance.Collections[definition.DefaultVariableMovement];
|
||||||
|
@ -100,7 +101,7 @@ namespace Syntriax.Modules.Movement.Config
|
||||||
public void SaveMovementDefinition(MovementDefinition definition)
|
public void SaveMovementDefinition(MovementDefinition definition)
|
||||||
{
|
{
|
||||||
string jsonText = JsonUtility.ToJson(definition, true);
|
string jsonText = JsonUtility.ToJson(definition, true);
|
||||||
string path = $"Assets/Resources/{ ResourceDirectoryToDefinitions }{definition.Name}.json";
|
string path = $"Assets/Resources/{ ResourceDirectoryToDefinitions }{ definition.Name }.json";
|
||||||
System.IO.File.WriteAllText(path, jsonText);
|
System.IO.File.WriteAllText(path, jsonText);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue