Skip to content

Commit ec490f7

Browse files
author
Chris Elion
authored
Merge pull request #3589 from Unity-Technologies/develop-sensor-access
make a few things in RayPerceptionSensorComponent public
2 parents 20b66e8 + 39a30c6 commit ec490f7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponentBase.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ internal int observationStacks
141141
[NonSerialized]
142142
RayPerceptionSensor m_RaySensor;
143143

144+
/// <summary>
145+
/// Get the RayPerceptionSensor that was created.
146+
/// </summary>
147+
public RayPerceptionSensor raySensor
148+
{
149+
get => m_RaySensor;
150+
}
151+
144152
/// <summary>
145153
/// Returns the <see cref="RayPerceptionCastType"/> for the associated raycast sensor.
146154
/// </summary>
@@ -223,7 +231,11 @@ public override int[] GetObservationShape()
223231
return new[] { obsSize * stacks };
224232
}
225233

226-
RayPerceptionInput GetRayPerceptionInput()
234+
/// <summary>
235+
/// Get the RayPerceptionInput that is used by the <see cref="RayPerceptionSensor"/>.
236+
/// </summary>
237+
/// <returns></returns>
238+
public RayPerceptionInput GetRayPerceptionInput()
227239
{
228240
var rayAngles = GetRayAngles(raysPerDirection, maxRayDegrees);
229241

0 commit comments

Comments
 (0)