Skip to content

Commit

Permalink
fix for ped index issue
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBoiseLGSVL committed Dec 20, 2019
1 parent f888675 commit 68ef0d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Assets/Scripts/Controllers/PedestrianController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,11 @@ private int GetNextTargetIndex(int index)

private Vector3 GetRandomTargetPosition(int index)
{
Vector3 tempV = targets[index];
Vector3 tempV = Vector3.zero;
if (targets.Count > 0 && index >= 0 && index < targets.Count)
{
tempV = targets[index];
}

int count = 0;
bool isInNavMesh = false;
Expand Down
3 changes: 3 additions & 0 deletions Assets/Scripts/Editor/Map/MapOriginEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,8 @@ public override void OnInspectorGUI()
origin.Description = EditorGUILayout.TextArea(origin.Description);
EditorGUILayout.EndHorizontal();
origin.LicenseName = EditorGUILayout.TextField("License Name", origin.LicenseName);

if (GUI.changed)
EditorUtility.SetDirty(origin);
}
}

0 comments on commit 68ef0d7

Please sign in to comment.