Skip to content

Commit 00150c1

Browse files
Updates for package validation errors. (#5671)
1 parent 3eeab5f commit 00150c1

File tree

5 files changed

+45
-10
lines changed

5 files changed

+45
-10
lines changed

DevProject/Packages/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"com.unity.inputsystem": "1.3.0",
55
"com.unity.ml-agents": "file:../../com.unity.ml-agents",
66
"com.unity.ml-agents.extensions": "file:../../com.unity.ml-agents.extensions",
7-
"com.unity.package-manager-doctools": "1.7.0-preview",
8-
"com.unity.package-validation-suite": "0.19.0-preview",
7+
"com.unity.package-manager-doctools": "1.10.0-preview",
8+
"com.unity.package-validation-suite": "0.23.4-preview",
99
"com.unity.test-framework": "1.1.24",
1010
"com.unity.test-framework.performance": "2.2.0-preview",
1111
"com.unity.testtools.codecoverage": "1.0.0-pre.3",

DevProject/Packages/packages-lock.json

+13-5
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"depth": 0,
6868
"source": "local",
6969
"dependencies": {
70-
"com.unity.ml-agents": "2.1.0-exp.1",
70+
"com.unity.ml-agents": "2.2.0",
7171
"com.unity.modules.physics": "1.0.0"
7272
}
7373
},
@@ -88,17 +88,18 @@
8888
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
8989
},
9090
"com.unity.package-manager-doctools": {
91-
"version": "1.7.0-preview",
91+
"version": "1.10.0-preview",
9292
"depth": 0,
9393
"source": "registry",
9494
"dependencies": {
95-
"com.unity.package-validation-suite": "0.10.0-preview",
96-
"com.unity.nuget.newtonsoft-json": "2.0.0-preview"
95+
"com.unity.package-validation-suite": "0.19.2-preview",
96+
"com.unity.nuget.newtonsoft-json": "2.0.0-preview",
97+
"com.unity.sharp-zip-lib": "1.2.2-preview"
9798
},
9899
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
99100
},
100101
"com.unity.package-validation-suite": {
101-
"version": "0.19.0-preview",
102+
"version": "0.23.4-preview",
102103
"depth": 0,
103104
"source": "registry",
104105
"dependencies": {
@@ -113,6 +114,13 @@
113114
"dependencies": {},
114115
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
115116
},
117+
"com.unity.sharp-zip-lib": {
118+
"version": "1.2.2-preview",
119+
"depth": 1,
120+
"source": "registry",
121+
"dependencies": {},
122+
"url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates"
123+
},
116124
"com.unity.test-framework": {
117125
"version": "1.1.24",
118126
"depth": 0,

com.unity.ml-agents/LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2017-2021 Unity Technologies
1+
com.unity.ml-agents copyright © 2017 Unity Technologies
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

com.unity.ml-agents/Runtime/Academy.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,11 @@ public int InferenceSeed
183183
set { m_InferenceSeed = value; }
184184
}
185185

186-
// Number of training areas to instantiate
187186
int m_NumAreas;
188187

188+
/// <summary>
189+
/// Number of training areas to instantiate.
190+
/// </summary>
189191
public int NumAreas => m_NumAreas;
190192

191193
/// <summary>

com.unity.ml-agents/Runtime/Areas/TrainingAreaReplicator.cs

+26-1
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,39 @@ namespace Unity.MLAgents.Areas
99
/// </summary>
1010
public class TrainingAreaReplicator : MonoBehaviour
1111
{
12+
/// <summary>
13+
/// The base training area to be replicated.
14+
/// </summary>
1215
public GameObject baseArea;
16+
17+
/// <summary>
18+
/// The number of training areas to replicate.
19+
/// </summary>
1320
public int numAreas = 1;
21+
22+
/// <summary>
23+
/// The separation between each training area.
24+
/// </summary>
1425
public float separation = 10f;
1526

1627
int3 m_GridSize = new int3(1, 1, 1);
1728
int m_areaCount = 0;
1829
string m_TrainingAreaName;
1930

31+
/// <summary>
32+
/// The size of the computed grid to pack the training areas into.
33+
/// </summary>
2034
public int3 GridSize => m_GridSize;
35+
36+
/// <summary>
37+
/// The name of the training area.
38+
/// </summary>
2139
public string TrainingAreaName => m_TrainingAreaName;
2240

41+
/// <summary>
42+
/// Called before the simulation begins to computed the grid size for distributing
43+
/// the replicated training areas and set the area name.
44+
/// </summary>
2345
public void Awake()
2446
{
2547
// Computes the Grid Size on Awake
@@ -28,6 +50,10 @@ public void Awake()
2850
m_TrainingAreaName = baseArea.name;
2951
}
3052

53+
/// <summary>
54+
/// Called after Awake and before the simulation begins and adds the training areas before
55+
/// the Academy begins.
56+
/// </summary>
3157
public void OnEnable()
3258
{
3359
// Adds the training are replicas during OnEnable to ensure they are added before the Academy begins its work.
@@ -85,4 +111,3 @@ void AddEnvironments()
85111
}
86112
}
87113
}
88-

0 commit comments

Comments
 (0)