diff --git a/com.unity.ml-agents/Runtime/Sensors/SensorShapeValidator.cs b/com.unity.ml-agents/Runtime/Sensors/SensorShapeValidator.cs index 2da5e534a4..d144913e86 100644 --- a/com.unity.ml-agents/Runtime/Sensors/SensorShapeValidator.cs +++ b/com.unity.ml-agents/Runtime/Sensors/SensorShapeValidator.cs @@ -26,7 +26,12 @@ public void ValidateSensors(List sensors) { // Check for compatibility with the other Agents' Sensors // TODO make sure this only checks once per agent - Debug.Assert(m_SensorShapes.Count == sensors.Count, $"Number of Sensors must match. {m_SensorShapes.Count} != {sensors.Count}"); + Debug.AssertFormat( + m_SensorShapes.Count == sensors.Count, + "Number of Sensors must match. {0} != {1}", + m_SensorShapes.Count, + sensors.Count + ); for (var i = 0; i < Mathf.Min(m_SensorShapes.Count, sensors.Count); i++) { var cachedShape = m_SensorShapes[i];