Skip to content

Commit 8d0a941

Browse files
release 0.11.2-preview.2
1 parent c924829 commit 8d0a941

File tree

7 files changed

+44
-30
lines changed

7 files changed

+44
-30
lines changed

.yamato/upm-ci-testprojects.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
1818
- unity-downloader-cli -u {{ editor.version }} -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published
1919
{% if suite.name == "standalone" %}
20-
- utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=./.Editor --reruncount=2 --artifacts_path=test-results --category=!Performance --stdout-filter=minimal --extra-editor-arg="--force-d3d11" {{suite.args}}StandaloneWindows64
20+
- utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=./.Editor --reruncount=2 --artifacts_path=test-results --category=!Performance;!Python --stdout-filter=minimal --extra-editor-arg="--force-d3d11" {{suite.args}}StandaloneWindows64
2121
{% else %}
2222
- utr/utr --testproject=./TestProjects/{{project.name}} --editor-location=./.Editor --reruncount=2 --artifacts_path=test-results --category=!Performance --stdout-filter=minimal --extra-editor-arg="--force-d3d11" {{suite.args}}
2323
{% endif %}

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ The Perception package provides a toolkit for generating large-scale datasets fo
1919

2020
Visit the [Unity Computer Vision](https://unity.com/computer-vision) page for more information on our tools and offerings!
2121

22-
[Join our mailing list](https://create.unity.com/computer-vision-newsletter-sign-up?_gl=1*m30uzd*_gcl_aw*R0NMLjE2NDE4MzcyMjAuQ2p3S0NBaUF6LS1PQmhCSUVpd0FHMXJJT2tyQnYwaFFpQUtBQ1pwdXlzeklPbkdtRHp4dnVVOXNSem1EY0dwaTdLOFRra3FQc2gwLTFSb0NHQlFRQXZEX0J3RQ..*_gcl_dc*R0NMLjE2NDE4MzcyMjAuQ2p3S0NBaUF6LS1PQmhCSUVpd0FHMXJJT2tyQnYwaFFpQUtBQ1pwdXlzeklPbkdtRHp4dnVVOXNSem1EY0dwaTdLOFRra3FQc2gwLTFSb0NHQlFRQXZEX0J3RQ). Sign up now to stay up to date on our latest product feature release, upcoming community events, though-leadership blog posts, and more!
23-
2422
## Getting Started
2523

2624
**[Quick Installation Instructions](com.unity.perception/Documentation~/SetupSteps.md)**

TestProjects/PerceptionURP/Assets/Tests/Editor/PerceptionCameraEditorUrpTests.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,7 @@ public void TearDown()
2525
[UnityTest]
2626
public IEnumerator MissingRendererFeature_ProducesLogError()
2727
{
28-
int sceneCount = SceneManager.sceneCount;
29-
for (int i = sceneCount - 1; i >= 0; i--)
30-
{
31-
EditorSceneManager.CloseScene(SceneManager.GetSceneAt(i), true);
32-
}
33-
34-
EditorSceneManager.NewScene(NewSceneSetup.EmptyScene);
28+
EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single);
3529

3630
var urpAsset = AssetDatabase.LoadAssetAtPath<UniversalRenderPipelineAsset>("Assets/Settings/NoGroundTruthURPAsset.asset");
3731
GraphicsSettings.renderPipelineAsset = urpAsset;

com.unity.perception/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2121

2222
### Fixed
2323

24+
## [0.11.2-preview.2] - 2022-04-28
25+
26+
### Fixed
27+
28+
Install and Open Data Visualizer on Mac
29+
30+
Documentation
31+
2432
## [0.11.1-preview.1] - 2022-04-13
2533

2634
### Added

com.unity.perception/Editor/Visualizer/VisualizerInstaller.cs

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class VisualizerInstaller : EditorWindow
1818
//This files stores entries as ProjectDataPath,PythonPID,Port,VisualizerPID
1919
//It keeps a record of the instances of visualizer opened so that we don't open a new one everytime
2020
const string k_FilenameStreamlitInstances = "Unity/streamlit_instances.csv";
21-
21+
static bool hasPerceptionInternal;
2222
static string PathToStreamlitInstances
2323
{
2424
get
@@ -42,17 +42,19 @@ const string k_NameOfVisualizerProcess
4242
= "datasetvisualizer";
4343
#endif
4444

45-
internal static Task InstallationCommand(ref int exitCode, string packagesPath, bool forcePublic)
45+
internal static Task InstallationCommand(ref int exitCode, string packagesPath)
4646
{
4747
var exitCodeCopy = exitCode;
4848
var pythonPath = Path.Combine(Directory.GetParent(packagesPath)?.ToString() ?? string.Empty, "python.exe");
4949

50-
var indexURL = forcePublic ? string.Empty : GetIndexURL();
50+
var indexURL = GetIndexURL();
5151

5252
#if UNITY_EDITOR_WIN
53-
var task = Task.Run(() => ExecuteCmd($"{pythonPath} -m pip install --upgrade --no-warn-script-location unity-cv-datasetvisualizer {indexURL}", ref exitCodeCopy));
53+
var task = Task.Run(() => ExecuteCmd($"\"{pythonPath}\" -m pip install --upgrade --no-warn-script-location unity-cv-datasetvisualizer {indexURL}", ref exitCodeCopy));
54+
task.Wait();
5455
#elif UNITY_EDITOR_OSX
55-
var task = Task.Run(() => ExecuteCmd($"cd {packagesPath}; ./python3.7 -m pip install --upgrade unity-cv-datasetvisualizer {indexURL}", ref exitCodeCopy));
56+
var task = Task.Run(() => ExecuteCmd($"cd \'{packagesPath}\'; ./python3.7 -m pip install --upgrade unity-cv-datasetvisualizer {indexURL}", ref exitCodeCopy));
57+
task.Wait();
5658
#endif
5759
exitCode = exitCodeCopy;
5860
return task;
@@ -63,9 +65,11 @@ internal static Task UninstallCommand(ref int exitCode, string packagesPath)
6365
var exitCodeCopy = exitCode;
6466
var pythonPath = Path.Combine(Directory.GetParent(packagesPath)?.ToString() ?? string.Empty, "Scripts");
6567
#if UNITY_EDITOR_WIN
66-
var task = Task.Run(() => ExecuteCmd($"cd {pythonPath} && pip uninstall -y unity-cv-datasetvisualizer", ref exitCodeCopy));
68+
var task = Task.Run(() => ExecuteCmd($"cd \"{pythonPath}\" && pip uninstall -y unity-cv-datasetvisualizer", ref exitCodeCopy));
69+
task.Wait();
6770
#elif UNITY_EDITOR_OSX
68-
var task = Task.Run(() => ExecuteCmd($"cd {packagesPath}; ./python3.7 pip uninstall unity-cv-datasetvisualizer", ref exitCodeCopy));
71+
var task = Task.Run(() => ExecuteCmd($"cd \'{packagesPath}\'; ./python3.7 -m pip uninstall -y unity-cv-datasetvisualizer", ref exitCodeCopy));
72+
task.Wait();
6973
#endif
7074
exitCode = exitCodeCopy;
7175
return task;
@@ -77,12 +81,13 @@ static string GetIndexURL()
7781
const string pckName = "com.unity.perception.internal";
7882
if (!File.Exists("Packages/manifest.json"))
7983
{
84+
hasPerceptionInternal = false;
8085
return string.Empty;
8186
}
8287

8388
var jsonText = File.ReadAllText("Packages/manifest.json");
84-
var hasPerceptionInternal = jsonText.Contains( pckName );
85-
return hasPerceptionInternal ? "--index-url=https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/unity-pypi-local/simple/" : string.Empty;
89+
hasPerceptionInternal = jsonText.Contains( pckName );
90+
return hasPerceptionInternal ? "--extra-index-url=https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/unity-pypi-local/simple/" : string.Empty;
8691
}
8792

8893
// ReSharper disable Unity.PerformanceAnalysis
@@ -131,14 +136,16 @@ static async Task SetupVisualizer()
131136

132137
EditorUtility.DisplayProgressBar("Setting up the Visualizer", "Installing Visualizer (This may take a few minutes)", 2f / steps);
133138

134-
await InstallationCommand(ref exitCode, packagesPath, false);
135-
if (exitCode != 0)
139+
await InstallationCommand(ref exitCode, packagesPath);
140+
if (exitCode != 0 && hasPerceptionInternal )
136141
{
137-
Debug.LogWarning("Installing Public Visualizer");
138-
await InstallationCommand(ref exitCode, packagesPath, true);
142+
Debug.LogWarning("Installation of internal visualizer is failed. You are probably not on VPN, turn on the VPN and try again.");
143+
EditorUtility.ClearProgressBar();
144+
return;
139145
}
140146
if (exitCode != 0)
141147
{
148+
Debug.LogWarning("Failed to install the visualizer.");
142149
EditorUtility.ClearProgressBar();
143150
return;
144151
}

com.unity.perception/Tests/Editor/PerceptionCameraEditorTests.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,25 @@ static void InstallOrUninstallVisualizerAsync(string packagesPath, bool installF
103103
if (installFlag)
104104
{
105105
EditorUtility.DisplayProgressBar("Setting up the Visualizer", "Installing Visualizer (This may take a few minutes)", 2f / steps);
106-
Task.WaitAll(VisualizerInstaller.InstallationCommand(ref exitCode, packagesPath, true));
106+
Task.WaitAll(VisualizerInstaller.InstallationCommand(ref exitCode, packagesPath));
107+
if (exitCode != 0)
108+
{
109+
Debug.LogWarning("Fail to Install the Visualizer");
110+
EditorUtility.ClearProgressBar();
111+
return;
112+
}
107113
}
108114
// if install flag is false, uninstall the visualizer
109115
else
110116
{
111117
EditorUtility.DisplayProgressBar("Uninstall the Visualizer", "Uninstalling Visualizer (This may take a few minutes)", 2f / steps);
112118
Task.WaitAll(VisualizerInstaller.UninstallCommand(ref exitCode, packagesPath));
113-
}
114-
if (exitCode != 0)
115-
{
116-
EditorUtility.ClearProgressBar();
117-
return;
119+
if (exitCode != 0)
120+
{
121+
Debug.LogWarning("Fail to Uninstall the Visualizer");
122+
EditorUtility.ClearProgressBar();
123+
return;
124+
}
118125
}
119126
EditorUtility.ClearProgressBar();
120127
}

com.unity.perception/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"displayName": "Perception",
1010
"name": "com.unity.perception",
1111
"unity": "2020.3",
12-
"version": "0.11.1-preview.1",
12+
"version": "0.11.2-preview.2",
1313
"samples": [
1414
{
1515
"displayName": "Tutorial Files",

0 commit comments

Comments
 (0)