Skip to content

Commit

Permalink
release 0.11.2-preview.2
Browse files Browse the repository at this point in the history
  • Loading branch information
vvernygora-unity3d committed Apr 28, 2022
1 parent c924829 commit 8d0a941
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .yamato/upm-ci-testprojects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
- unity-downloader-cli -u {{ editor.version }} -c editor -c StandaloneSupport-IL2CPP -c Linux --wait --published
{% if suite.name == "standalone" %}
- 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
- 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
{% else %}
- 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}}
{% endif %}
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ The Perception package provides a toolkit for generating large-scale datasets fo

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

[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!

## Getting Started

**[Quick Installation Instructions](com.unity.perception/Documentation~/SetupSteps.md)**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,7 @@ public void TearDown()
[UnityTest]
public IEnumerator MissingRendererFeature_ProducesLogError()
{
int sceneCount = SceneManager.sceneCount;
for (int i = sceneCount - 1; i >= 0; i--)
{
EditorSceneManager.CloseScene(SceneManager.GetSceneAt(i), true);
}

EditorSceneManager.NewScene(NewSceneSetup.EmptyScene);
EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single);

var urpAsset = AssetDatabase.LoadAssetAtPath<UniversalRenderPipelineAsset>("Assets/Settings/NoGroundTruthURPAsset.asset");
GraphicsSettings.renderPipelineAsset = urpAsset;
Expand Down
8 changes: 8 additions & 0 deletions com.unity.perception/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed

## [0.11.2-preview.2] - 2022-04-28

### Fixed

Install and Open Data Visualizer on Mac

Documentation

## [0.11.1-preview.1] - 2022-04-13

### Added
Expand Down
33 changes: 20 additions & 13 deletions com.unity.perception/Editor/Visualizer/VisualizerInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class VisualizerInstaller : EditorWindow
//This files stores entries as ProjectDataPath,PythonPID,Port,VisualizerPID
//It keeps a record of the instances of visualizer opened so that we don't open a new one everytime
const string k_FilenameStreamlitInstances = "Unity/streamlit_instances.csv";

static bool hasPerceptionInternal;
static string PathToStreamlitInstances
{
get
Expand All @@ -42,17 +42,19 @@ const string k_NameOfVisualizerProcess
= "datasetvisualizer";
#endif

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

var indexURL = forcePublic ? string.Empty : GetIndexURL();
var indexURL = GetIndexURL();

#if UNITY_EDITOR_WIN
var task = Task.Run(() => ExecuteCmd($"{pythonPath} -m pip install --upgrade --no-warn-script-location unity-cv-datasetvisualizer {indexURL}", ref exitCodeCopy));
var task = Task.Run(() => ExecuteCmd($"\"{pythonPath}\" -m pip install --upgrade --no-warn-script-location unity-cv-datasetvisualizer {indexURL}", ref exitCodeCopy));
task.Wait();
#elif UNITY_EDITOR_OSX
var task = Task.Run(() => ExecuteCmd($"cd {packagesPath}; ./python3.7 -m pip install --upgrade unity-cv-datasetvisualizer {indexURL}", ref exitCodeCopy));
var task = Task.Run(() => ExecuteCmd($"cd \'{packagesPath}\'; ./python3.7 -m pip install --upgrade unity-cv-datasetvisualizer {indexURL}", ref exitCodeCopy));
task.Wait();
#endif
exitCode = exitCodeCopy;
return task;
Expand All @@ -63,9 +65,11 @@ internal static Task UninstallCommand(ref int exitCode, string packagesPath)
var exitCodeCopy = exitCode;
var pythonPath = Path.Combine(Directory.GetParent(packagesPath)?.ToString() ?? string.Empty, "Scripts");
#if UNITY_EDITOR_WIN
var task = Task.Run(() => ExecuteCmd($"cd {pythonPath} && pip uninstall -y unity-cv-datasetvisualizer", ref exitCodeCopy));
var task = Task.Run(() => ExecuteCmd($"cd \"{pythonPath}\" && pip uninstall -y unity-cv-datasetvisualizer", ref exitCodeCopy));
task.Wait();
#elif UNITY_EDITOR_OSX
var task = Task.Run(() => ExecuteCmd($"cd {packagesPath}; ./python3.7 pip uninstall unity-cv-datasetvisualizer", ref exitCodeCopy));
var task = Task.Run(() => ExecuteCmd($"cd \'{packagesPath}\'; ./python3.7 -m pip uninstall -y unity-cv-datasetvisualizer", ref exitCodeCopy));
task.Wait();
#endif
exitCode = exitCodeCopy;
return task;
Expand All @@ -77,12 +81,13 @@ static string GetIndexURL()
const string pckName = "com.unity.perception.internal";
if (!File.Exists("Packages/manifest.json"))
{
hasPerceptionInternal = false;
return string.Empty;
}

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

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

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

await InstallationCommand(ref exitCode, packagesPath, false);
if (exitCode != 0)
await InstallationCommand(ref exitCode, packagesPath);
if (exitCode != 0 && hasPerceptionInternal )
{
Debug.LogWarning("Installing Public Visualizer");
await InstallationCommand(ref exitCode, packagesPath, true);
Debug.LogWarning("Installation of internal visualizer is failed. You are probably not on VPN, turn on the VPN and try again.");
EditorUtility.ClearProgressBar();
return;
}
if (exitCode != 0)
{
Debug.LogWarning("Failed to install the visualizer.");
EditorUtility.ClearProgressBar();
return;
}
Expand Down
19 changes: 13 additions & 6 deletions com.unity.perception/Tests/Editor/PerceptionCameraEditorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,25 @@ static void InstallOrUninstallVisualizerAsync(string packagesPath, bool installF
if (installFlag)
{
EditorUtility.DisplayProgressBar("Setting up the Visualizer", "Installing Visualizer (This may take a few minutes)", 2f / steps);
Task.WaitAll(VisualizerInstaller.InstallationCommand(ref exitCode, packagesPath, true));
Task.WaitAll(VisualizerInstaller.InstallationCommand(ref exitCode, packagesPath));
if (exitCode != 0)
{
Debug.LogWarning("Fail to Install the Visualizer");
EditorUtility.ClearProgressBar();
return;
}
}
// if install flag is false, uninstall the visualizer
else
{
EditorUtility.DisplayProgressBar("Uninstall the Visualizer", "Uninstalling Visualizer (This may take a few minutes)", 2f / steps);
Task.WaitAll(VisualizerInstaller.UninstallCommand(ref exitCode, packagesPath));
}
if (exitCode != 0)
{
EditorUtility.ClearProgressBar();
return;
if (exitCode != 0)
{
Debug.LogWarning("Fail to Uninstall the Visualizer");
EditorUtility.ClearProgressBar();
return;
}
}
EditorUtility.ClearProgressBar();
}
Expand Down
2 changes: 1 addition & 1 deletion com.unity.perception/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"displayName": "Perception",
"name": "com.unity.perception",
"unity": "2020.3",
"version": "0.11.1-preview.1",
"version": "0.11.2-preview.2",
"samples": [
{
"displayName": "Tutorial Files",
Expand Down

0 comments on commit 8d0a941

Please sign in to comment.