Browse Source

wp script updated

main
cailean 10 months ago
parent
commit
35e85f4769
  1. 1077
      Assets/15_Prefabs/Waypoints.prefab
  2. 1343
      Assets/6_Scenes/Beep.unity
  3. 20
      Assets/7_Scripts/Waypoint/WaypointManager.cs
  4. 2
      Assets/ML-Agents/Timers/Beep_timers.json

1077
Assets/15_Prefabs/Waypoints.prefab

File diff suppressed because it is too large

1343
Assets/6_Scenes/Beep.unity

File diff suppressed because it is too large

20
Assets/7_Scripts/Waypoint/WaypointManager.cs

@ -12,6 +12,9 @@ public class WaypointManager : MonoBehaviour
[SerializeField]
public List<Waypoint> m_WaypointList;
[SerializeField]
public Waypoint[] m_WaypointArray;
[SerializeField]
public Transform m_Target;
@ -35,7 +38,7 @@ public class WaypointManager : MonoBehaviour
private void Start()
{
SortWaypointsInChildren();
SortWaypointInChildrenArray();
m_CurrentWaypoint = m_WaypointList[0];
MoveTargetToWaypoint();
}
@ -94,6 +97,21 @@ public class WaypointManager : MonoBehaviour
m_WaypointList = m_WaypointList.OrderBy(waypoint => waypoint.m_Index).ToList();
}
private void SortWaypointInChildrenArray()
{
m_WaypointArray = GetComponentsInChildren<Waypoint>();
foreach (Waypoint wp in m_WaypointArray)
{
if ( wp.isActiveAndEnabled )
{
m_WaypointList.Add(wp);
}
}
m_WaypointList = m_WaypointList.OrderBy(waypoint => waypoint.m_Index).ToList();
}
private void CheckOverride()
{
if(Input.GetKeyUp(KeyCode.F))

2
Assets/ML-Agents/Timers/Beep_timers.json

@ -1 +1 @@
{"count":1,"self":75.253664,"total":76.31988,"children":{"InitializeActuators":{"count":1,"self":0.0041069999999999995,"total":0.0041069999999999995,"children":null},"InitializeSensors":{"count":1,"self":0.0075749999999999993,"total":0.0075749999999999993,"children":null},"AgentSendState":{"count":3704,"self":0.066845,"total":0.159805,"children":{"CollectObservations":{"count":741,"self":0.029764,"total":0.029764,"children":null},"WriteActionMask":{"count":741,"self":0.0024649999999999997,"total":0.0024649999999999997,"children":null},"RequestDecision":{"count":741,"self":0.060731,"total":0.060731,"children":null}}},"DecideAction":{"count":3704,"self":0.82916499999999993,"total":0.843588,"children":{"RayPerceptionSensor.Perceive":{"count":741,"self":0.014423,"total":0.014423,"children":null}}},"AgentAct":{"count":3704,"self":0.04795,"total":0.04795,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1710240286","unity_version":"2023.2.8f1","command_line_arguments":"\/Applications\/Unity\/Hub\/Editor\/2023.2.8f1\/Unity.app\/Contents\/MacOS\/Unity -projectpath \/Users\/scn\/Documents\/BB_Beauty & The Beep\/12 Unity\/git\/beep-final -useHub -hubIPC -cloudEnvironment production","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.3.0-exp.3","scene_name":"Beep","end_time_seconds":"1710240362"}}
{"count":1,"self":7.7843767999999995,"total":10.934324799999999,"children":{"InitializeActuators":{"count":1,"self":0.0010069,"total":0.0010069,"children":null},"InitializeSensors":{"count":1,"self":0.0015153,"total":0.0015153,"children":null},"AgentSendState":{"count":249,"self":0.0030978,"total":0.0262465,"children":{"CollectObservations":{"count":50,"self":0.0024814,"total":0.0024814,"children":null},"WriteActionMask":{"count":50,"self":0,"total":0,"children":null},"RequestDecision":{"count":50,"self":0.0206673,"total":0.0206673,"children":null}}},"DecideAction":{"count":249,"self":0.146207,"total":3.1166563,"children":{"RayPerceptionSensor.Perceive":{"count":50,"self":2.9704492,"total":2.9704493,"children":null}}},"AgentAct":{"count":249,"self":0.0045230999999999995,"total":0.0045230999999999995,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1710245623","unity_version":"2023.2.8f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2023.2.8f1\\Editor\\Unity.exe -projectpath C:\\Users\\caile\\Desktop\\Projects\\24_02-Beep\\4_Unity\\Beep Final Git\\beep-final -useHub -hubIPC -cloudEnvironment production","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.3.0-exp.3","scene_name":"Beep","end_time_seconds":"1710245634"}}
Loading…
Cancel
Save