Warning Added

This commit is contained in:
Syntriax 2022-11-15 14:50:41 +03:00
parent 8d1f4d5f96
commit b0442c2af9
1 changed files with 3 additions and 1 deletions

View File

@ -74,8 +74,10 @@ namespace Syntriax.Modules.Movement
return;
}
Debug.LogWarning("No IMovement found with \"CanTakeOver\" value set to true, setting the last IMovement as the ActiveMovement. Please have an IMovement that you can use as a fallback with it's \"CanTakeOver\" value always set to true.", this);
try { ActiveMovement = Movements[Movements.Count - 1]; }
catch (System.Exception) { Debug.LogError("Movement Controller component needs at least one Monobehaviour attached that implements IMovement interface", this); }
catch (System.Exception) { Debug.LogWarning("Movement Controller component needs at least one Monobehaviour attached that implements IMovement interface", this); }
}
public void Move(float x = 0, float y = 0, float z = 0)