Skip to content

Commit

Permalink
XmlDoc update
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRibard committed Sep 2, 2024
1 parent 205396d commit fc6ca44
Show file tree
Hide file tree
Showing 60 changed files with 170 additions and 179 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class BasicActuatorComponent : ActuatorComponent
/// <summary>
/// Creates a BasicActuator.
/// </summary>
/// <returns></returns>
/// <returns>Corresponding actuators.</returns>
public override IActuator[] CreateActuators()
{
return new IActuator[] { new BasicActuator(basicController) };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class BasicSensorComponent : SensorComponent
/// <summary>
/// Creates a BasicSensor.
/// </summary>
/// <returns></returns>
/// <returns>Corresponding sensors.</returns>
public override ISensor[] CreateSensors()
{
return new ISensor[] { new BasicSensor(basicController) };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class DragonInfo
/// <summary>
/// Max Academy steps before this platform resets
/// </summary>
/// <returns></returns>
/// <returns>The maximum steps before this platform resets.</returns>
[Header("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;
private int m_ResetTimer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public bool MarkMatchedCells(int[,] cells = null)
/// <summary>
/// Sets cells that are matched to the empty cell, and returns the score earned.
/// </summary>
/// <returns></returns>
/// <returns>The number of earned points.</returns>
public int ClearMatchedCells()
{
var pointsByType = new[] { BasicCellPoints, SpecialCell1Points, SpecialCell2Points };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public class BlockInfo
/// <summary>
/// Max Academy steps before this platform resets
/// </summary>
/// <returns></returns>
[Header("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static float CreateForwardVector(Vector2 move)
/// listening to C# events, Unity Events, or receiving Messages from the Input System Package as those callbacks
/// are set up through the generated <see cref="IInputActionCollection2"/>.
/// </summary>
/// <returns></returns>
/// <returns>Corresponing action collection tuple.</returns>
public (InputActionAsset, IInputActionCollection2) GetInputActionAsset()
{
LazyInitializeActions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ public static string GetOverrideBehaviorName(string originalBehaviorName)
/// Get the asset path to use from the commandline arguments.
/// Can be called multiple times - if m_HaveProcessedCommandLine is set, will have no effect.
/// </summary>
/// <returns></returns>
void GetAssetPathFromCommandLine()
{
if (m_HaveProcessedCommandLine)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public class PlayerInfo
/// <summary>
/// Max Academy steps before this platform resets
/// </summary>
/// <returns></returns>
[Tooltip("Max Environment Steps")] public int MaxEnvironmentSteps = 25000;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class ButtonInputActionAdaptor : IRLActionInputAdaptor
/// for pressed.
/// </summary>
/// <param name="action">The action associated with this adaptor to help determine the action space.</param>
/// <returns></returns>
/// <returns>ActionSpec with 1 branch of size 2.</returns>
public ActionSpec GetActionSpecForInputAction(InputAction action)
{
return ActionSpec.MakeDiscrete(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ internal static IActuator[] CreateActuatorsFromMap(InputActionMap inputActionMap
/// </summary>
/// <param name="isInHeuristicMode">true if the Agent connected to this GameObject is working in
/// Heuristic mode.</param>
/// <seealso cref="BehaviorParameters.IsInHeuristicMode"/>
/// <see cref="BehaviorParameters.IsInHeuristicMode"/>
internal void UpdateDeviceBinding(bool isInHeuristicMode)
{
if (ReferenceEquals(m_Device, null))
Expand Down Expand Up @@ -259,7 +259,6 @@ internal static InputControlScheme CreateControlScheme(InputControl device,
/// </summary>
/// <param name="defaultMap"></param>
/// <param name="layoutName"></param>
/// <returns></returns>
internal static void RegisterLayoutBuilder(InputActionMap defaultMap, string layoutName)
{
if (InputSystem.LoadLayout(layoutName) == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ArticulationBodySensorComponent : SensorComponent
/// <summary>
/// Creates a PhysicsBodySensor.
/// </summary>
/// <returns></returns>
/// <returns>Corresponding sensors.</returns>
public override ISensor[] CreateSensors()
{
return new ISensor[] {new PhysicsBodySensor(RootBody, Settings, sensorName)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected internal override ProcessCollidersMethod GetProcessCollidersMethod()
/// <param name="detectedObject">The game object that was detected within a certain cell</param>
/// <param name="tagIndex">The index of the detectedObject's tag in the DetectableObjects list</param>
/// <param name="dataBuffer">The buffer to write the observation values.
/// The buffer size is configured by <seealso cref="GetCellObservationSize"/>.
/// The buffer size is configured by <see cref="GetCellObservationSize"/>.
/// </param>
protected override void GetObjectData(GameObject detectedObject, int tagIndex, float[] dataBuffer)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public struct PhysicsSensorSettings
/// <summary>
/// Creates a PhysicsSensorSettings with reasonable default values.
/// </summary>
/// <returns></returns>
/// <returns>`PhysicsSensorSettings` with reasonable default values.</returns>
public static PhysicsSensorSettings Default()
{
return new PhysicsSensorSettings
Expand Down
18 changes: 9 additions & 9 deletions com.unity.ml-agents.extensions/Runtime/Sensors/PoseExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public int NumPoses
/// Get the parent index of the body at the specified index.
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
/// <returns>The parent index of the body at the specified index.</returns>
public int GetParentIndex(int index)
{
if (m_ParentIndices == null)
Expand Down Expand Up @@ -195,22 +195,22 @@ protected void Setup(int[] parentIndices)
/// Return the world space Pose of the i'th object.
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
/// <returns>The world space Pose at given index.</returns>
protected internal abstract Pose GetPoseAt(int index);

/// <summary>
/// Return the world space linear velocity of the i'th object.
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
/// <returns>The world space linear velocity at given index.</returns>
protected internal abstract Vector3 GetLinearVelocityAt(int index);

/// <summary>
/// Return the underlying object at the given index. This is only
/// used for display in the inspector.
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
/// <returns>The `Object` at given index.</returns>
protected internal virtual Object GetObjectAt(int index)
{
return null;
Expand Down Expand Up @@ -285,7 +285,7 @@ public void UpdateLocalSpacePoses()
/// Compute the number of floats needed to represent the poses for the given PhysicsSensorSettings.
/// </summary>
/// <param name="settings"></param>
/// <returns></returns>
/// <returns>The number of floats needed to represent the poses for the given `PhysicsSensorSettings`.</returns>
public int GetNumPoseObservations(PhysicsSensorSettings settings)
{
int obsPerPose = 0;
Expand Down Expand Up @@ -355,7 +355,7 @@ internal struct DisplayNode
/// <summary>
/// Get a list of display nodes in depth-first order.
/// </summary>
/// <returns></returns>
/// <returns>The display nodes.</returns>
internal IList<DisplayNode> GetDisplayNodes()
{
if (NumPoses == 0)
Expand Down Expand Up @@ -434,7 +434,7 @@ public static class PoseExtensions
/// will equal the identity pose (within tolerance).
/// </summary>
/// <param name="pose"></param>
/// <returns></returns>
/// <returns>Inverse `Pose`.</returns>
public static Pose Inverse(this Pose pose)
{
var rotationInverse = Quaternion.Inverse(pose.rotation);
Expand All @@ -447,7 +447,7 @@ public static Pose Inverse(this Pose pose)
/// </summary>
/// <param name="pose"></param>
/// <param name="rhs"></param>
/// <returns></returns>
/// <returns>Multiplied `Pose`.</returns>
public static Pose Multiply(this Pose pose, Pose rhs)
{
return rhs.GetTransformedBy(pose);
Expand All @@ -460,7 +460,7 @@ public static Pose Multiply(this Pose pose, Pose rhs)
/// </summary>
/// <param name="pose"></param>
/// <param name="rhs"></param>
/// <returns></returns>
/// <returns>Multiplied `Pose`.</returns>
public static Vector3 Multiply(this Pose pose, Vector3 rhs)
{
return pose.rotation * rhs + pose.position;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ protected internal override Object GetObjectAt(int index)
/// <summary>
/// Get a dictionary indicating which Rigidbodies' poses are enabled or disabled.
/// </summary>
/// <returns></returns>
/// <returns>`Dictionary` indicating which Rigidbodies' poses are enabled or disabled.</returns>
internal Dictionary<Rigidbody, bool> GetBodyPosesEnabled()
{
var bodyPosesEnabled = new Dictionary<Rigidbody, bool>(m_Bodies.Length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class RigidBodySensorComponent : SensorComponent
/// <summary>
/// Creates a PhysicsBodySensor.
/// </summary>
/// <returns></returns>
/// <returns>Corresponding sensors.</returns>
public override ISensor[] CreateSensors()
{
var _sensorName = string.IsNullOrEmpty(sensorName) ? $"PhysicsBodySensor:{RootBody?.name}" : sensorName;
Expand All @@ -48,7 +48,7 @@ public override ISensor[] CreateSensors()
/// <summary>
/// Get the DisplayNodes of the hierarchy.
/// </summary>
/// <returns></returns>
/// <returns>The `DisplayNodes` of the hierarchy.</returns>
internal IList<PoseExtractor.DisplayNode> GetDisplayNodes()
{
return GetPoseExtractor().GetDisplayNodes();
Expand All @@ -57,7 +57,7 @@ public override ISensor[] CreateSensors()
/// <summary>
/// Lazy construction of the PoseExtractor.
/// </summary>
/// <returns></returns>
/// <returns>Corresponding `RigidBodyPoseExtractor`</returns>
RigidBodyPoseExtractor GetPoseExtractor()
{
if (m_PoseExtractor == null)
Expand Down
3 changes: 2 additions & 1 deletion com.unity.ml-agents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [4.0.0] - 2024-09-02

### Major Changes
#### com.unity.ml-agents / com.unity.ml-agents.extensions (C#)
- Upgraded to Sentis 1.3.0-pre.3 (#6070)
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Editor/EditorUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class EditorUtilities
/// <summary>
/// Whether or not properties that affect the model can be updated at the current time.
/// </summary>
/// <returns></returns>
/// <returns>True if the model can be updated, False if not.</returns>
public static bool CanUpdateModelProperties()
{
return !Application.isPlaying;
Expand Down
6 changes: 3 additions & 3 deletions com.unity.ml-agents/Runtime/Academy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static bool IsInitialized
/// <summary>
/// Reports whether or not the communicator is on.
/// </summary>
/// <seealso cref="ICommunicator"/>
/// <see cref="ICommunicator"/>
/// <value>
/// <c>True</c>, if communicator is on, <c>false</c> otherwise.
/// </value>
Expand Down Expand Up @@ -400,7 +400,7 @@ static int ReadPortFromArgs()
/// then the values of the parameters generated from the training process can be
/// retrieved here.
/// </summary>
/// <returns></returns>
/// <returns>The `EnvironmentParameters` instance.</returns>
public EnvironmentParameters EnvironmentParameters
{
get { return m_EnvironmentParameters; }
Expand All @@ -410,7 +410,7 @@ public EnvironmentParameters EnvironmentParameters
/// Returns the <see cref="StatsRecorder"/> instance. This instance can be used
/// to record any statistics from the Unity environment.
/// </summary>
/// <returns></returns>
/// <returns>The `StatsRecorder` instance.</returns>
public StatsRecorder StatsRecorder
{
get { return m_StatsRecorder; }
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Actuators/ActuatorComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public abstract class ActuatorComponent : MonoBehaviour
/// The specification of the possible actions for this ActuatorComponent.
/// This must produce the same results as the corresponding IActuator's ActionSpec.
/// </summary>
/// <seealso cref="ActionSpec"/>
/// <see cref="ActionSpec"/>
public abstract ActionSpec ActionSpec { get; }
}
}
4 changes: 2 additions & 2 deletions com.unity.ml-agents/Runtime/Actuators/ActuatorManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal class ActuatorManager : IList<IActuator>
/// <summary>
/// Flag used to check if our IActuators are ready for execution.
/// </summary>
/// <seealso cref="ReadyActuatorsForExecution(IList{IActuator}, int, int, int)"/>
/// <see cref="ReadyActuatorsForExecution(IList{IActuator}, int, int, int)"/>
bool m_ReadyForExecution;

/// <summary>
Expand Down Expand Up @@ -143,7 +143,7 @@ internal static ActionSpec CombineActionSpecs(IList<IActuator> actuators)
/// <summary>
/// Returns an ActionSpec representing the concatenation of all IActuator's ActionSpecs
/// </summary>
/// <returns></returns>
/// <returns>`ActionSpec` representing the concatenation of all `ActionSpec`s.</returns>
public ActionSpec GetCombinedActionSpec()
{
ReadyActuatorsForExecution();
Expand Down
2 changes: 1 addition & 1 deletion com.unity.ml-agents/Runtime/Actuators/IActionReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public interface IActionReceiver
///
/// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_21_docs/docs/Learning-Environment-Design-Agents.md#actions
/// </remarks>
/// <seealso cref="IActionReceiver.OnActionReceived"/>
/// <see cref="IActionReceiver.OnActionReceived"/>
void WriteDiscreteActionMask(IDiscreteActionMask actionMask);
}
}
6 changes: 3 additions & 3 deletions com.unity.ml-agents/Runtime/Actuators/IActuator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ public interface IActuator : IActionReceiver, IHeuristicProvider
/// <summary>
/// The specification of the actions for this IActuator.
/// </summary>
/// <seealso cref="ActionSpec"/>
/// <see cref="ActionSpec"/>
ActionSpec ActionSpec { get; }

/// <summary>
/// Gets the name of this IActuator which will be used to sort it.
/// </summary>
/// <returns></returns>
/// <returns>The string name of this `IActuator`</returns>
string Name { get; }

/// <summary>
Expand All @@ -33,7 +33,7 @@ public static class IActuatorExtensions
/// Returns the number of discrete branches + the number of continuous actions.
/// </summary>
/// <param name="actuator"></param>
/// <returns></returns>
/// <returns>The number possible actions.</returns>
public static int TotalNumberOfActions(this IActuator actuator)
{
return actuator.ActionSpec.NumContinuousActions + actuator.ActionSpec.NumDiscreteActions;
Expand Down
Loading

0 comments on commit fc6ca44

Please sign in to comment.