File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Project/Assets/ML-Agents/Examples/Soccer/Scripts Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,16 @@ public enum Position
5050
5151 public override void Initialize ( )
5252 {
53- m_Existential = 1f / MaxStep ;
53+ SoccerEnvController envController = GetComponentInParent < SoccerEnvController > ( ) ;
54+ if ( envController != null )
55+ {
56+ m_Existential = 1f / envController . MaxEnvironmentSteps ;
57+ }
58+ else
59+ {
60+ m_Existential = 1f / MaxStep ;
61+ }
62+
5463 m_BehaviorParameters = gameObject . GetComponent < BehaviorParameters > ( ) ;
5564 if ( m_BehaviorParameters . TeamId == ( int ) Team . Blue )
5665 {
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public class PlayerInfo
2121 /// Max Academy steps before this platform resets
2222 /// </summary>
2323 /// <returns></returns>
24- [ Header ( "Max Environment Steps" ) ] public int MaxEnvironmentSteps = 25000 ;
24+ [ Tooltip ( "Max Environment Steps" ) ] public int MaxEnvironmentSteps = 25000 ;
2525
2626 /// <summary>
2727 /// The area bounds.
You can’t perform that action at this time.
0 commit comments