From 4db768d69b364451c8c10f31ee91feae1d8545f4 Mon Sep 17 00:00:00 2001 From: Christopher Goy Date: Mon, 23 Sep 2019 16:26:48 -0700 Subject: [PATCH] [format] Format code to be complaint with Unity coding conventions. --- .../Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs | 2 +- .../Examples/FoodCollector/Scripts/FoodCollectorAgent.cs | 2 +- .../Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs | 2 +- .../Plugins/Barracuda.Core/Barracuda/Plugins/OSX/MacBLAS.cs | 2 +- UnitySDK/Assets/ML-Agents/Scripts/BrainParameters.cs | 4 ++-- UnitySDK/Assets/ML-Agents/Scripts/UnityAgentsException.cs | 1 - 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs b/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs index e0675cb54e..e286f2ae41 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs +++ b/UnitySDK/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs @@ -282,7 +282,7 @@ public override void AgentReset() { bodyPart.Reset(bodyPart); } - if(!targetIsStatic) + if (!targetIsStatic) { GetRandomTargetPos(); } diff --git a/UnitySDK/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorAgent.cs b/UnitySDK/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorAgent.cs index 6c83462c5e..7c72ccfcf8 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorAgent.cs +++ b/UnitySDK/Assets/ML-Agents/Examples/FoodCollector/Scripts/FoodCollectorAgent.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; using MLAgents; public class FoodCollectorAgent : Agent diff --git a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs b/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs index ab8eb82b7c..2c0ec23162 100644 --- a/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs +++ b/UnitySDK/Assets/ML-Agents/Examples/Soccer/Scripts/AgentSoccer.cs @@ -28,7 +28,7 @@ public enum AgentRole float[] m_RayAngles = { 0f, 45f, 90f, 135f, 180f, 110f, 70f }; string[] m_DetectableObjectsPurple = { "ball", "purpleGoal", "blueGoal", - "wall", "purpleAgent", "blueAgent" }; + "wall", "purpleAgent", "blueAgent" }; string[] m_DetectableObjectsBlue = { "ball", "blueGoal", "purpleGoal", "wall", "blueAgent", "purpleAgent" }; diff --git a/UnitySDK/Assets/ML-Agents/Plugins/Barracuda.Core/Barracuda/Plugins/OSX/MacBLAS.cs b/UnitySDK/Assets/ML-Agents/Plugins/Barracuda.Core/Barracuda/Plugins/OSX/MacBLAS.cs index c7cec81a8b..fdd22b3647 100644 --- a/UnitySDK/Assets/ML-Agents/Plugins/Barracuda.Core/Barracuda/Plugins/OSX/MacBLAS.cs +++ b/UnitySDK/Assets/ML-Agents/Plugins/Barracuda.Core/Barracuda/Plugins/OSX/MacBLAS.cs @@ -16,7 +16,7 @@ static extern unsafe void macsgemm(float* ap, int an, int am, public bool IsCurrentPlatformSupported() { - return Application.platform == RuntimePlatform.OSXEditor || + return Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.OSXPlayer; } diff --git a/UnitySDK/Assets/ML-Agents/Scripts/BrainParameters.cs b/UnitySDK/Assets/ML-Agents/Scripts/BrainParameters.cs index cf8c5e8952..52e1748943 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/BrainParameters.cs +++ b/UnitySDK/Assets/ML-Agents/Scripts/BrainParameters.cs @@ -79,7 +79,7 @@ public CommunicatorObjects.BrainParametersProto NumStackedVectorObservations = numStackedVectorObservations, VectorActionSize = {vectorActionSize}, VectorActionSpaceType = - (CommunicatorObjects.SpaceTypeProto) vectorActionSpaceType, + (CommunicatorObjects.SpaceTypeProto)vectorActionSpaceType, BrainName = name, IsTraining = isTraining }; @@ -131,7 +131,7 @@ public BrainParameters(CommunicatorObjects.BrainParametersProto brainParametersP numStackedVectorObservations = brainParametersProto.NumStackedVectorObservations; vectorActionSize = brainParametersProto.VectorActionSize.ToArray(); vectorActionDescriptions = brainParametersProto.VectorActionDescriptions.ToArray(); - vectorActionSpaceType = (SpaceType) brainParametersProto.VectorActionSpaceType; + vectorActionSpaceType = (SpaceType)brainParametersProto.VectorActionSpaceType; } /// diff --git a/UnitySDK/Assets/ML-Agents/Scripts/UnityAgentsException.cs b/UnitySDK/Assets/ML-Agents/Scripts/UnityAgentsException.cs index 224d66027d..e2fd03b5b6 100644 --- a/UnitySDK/Assets/ML-Agents/Scripts/UnityAgentsException.cs +++ b/UnitySDK/Assets/ML-Agents/Scripts/UnityAgentsException.cs @@ -18,7 +18,6 @@ protected UnityAgentsException( System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { - } } }