-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [4.1.0] - 2021-08-04 ### Changes * Messaging and removing the Lumin platform in 2021.1+. Support is still maintained for Unity 2020 LTS and 2019 LTS. ### Fixes * Fix [1343655](https://issuetracker.unity3d.com/product/unity/issues/guid/1343655/) by adding an API for getting all package metadata so that users can use the correct information when dealing with package metadata store.
- Loading branch information
Unity Technologies
committed
Aug 4, 2021
1 parent
b7695d4
commit 32a3ab2
Showing
9 changed files
with
142 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
using NUnit.Framework; | ||
|
||
using System; | ||
using System.IO; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using UnityEngine; | ||
using UnityEngine.XR.Management; | ||
using UnityEngine.XR.Management.Tests; | ||
|
||
using Unity.XR.TestTooling; | ||
|
||
namespace UnityEditor.XR.Management.Tests | ||
{ | ||
class PackageInitSettingsTests | ||
{ | ||
string oldAssetName; | ||
string oldFolderName; | ||
string oldSettingsPath; | ||
string oldPackageInitPath; | ||
|
||
string tempFolderName; | ||
|
||
[SetUp] | ||
public void SetUp() | ||
{ | ||
oldAssetName = XRPackageInitializationSettings.s_ProjectSettingsAssetName; | ||
oldFolderName = XRPackageInitializationSettings.s_ProjectSettingsFolder; | ||
oldSettingsPath = XRPackageInitializationSettings.s_ProjectSettingsPath; | ||
oldPackageInitPath = XRPackageInitializationSettings.s_PackageInitPath; | ||
|
||
tempFolderName = $"Temp{DateTime.Now.Ticks}"; | ||
|
||
XRPackageInitializationSettings.s_ProjectSettingsAssetName = "test.asset"; | ||
XRPackageInitializationSettings.s_ProjectSettingsFolder = $"{tempFolderName}/ProjectSettings"; | ||
XRPackageInitializationSettings.s_ProjectSettingsPath = ""; | ||
XRPackageInitializationSettings.s_PackageInitPath = ""; | ||
|
||
} | ||
|
||
[TearDown] | ||
public void TearDown() | ||
{ | ||
AssetDatabase.DeleteAsset($"Assets/{tempFolderName}"); | ||
XRPackageInitializationSettings.s_ProjectSettingsAssetName = oldAssetName; | ||
XRPackageInitializationSettings.s_ProjectSettingsFolder = oldFolderName; | ||
XRPackageInitializationSettings.s_ProjectSettingsPath = oldSettingsPath; | ||
XRPackageInitializationSettings.s_PackageInitPath = oldPackageInitPath; | ||
} | ||
|
||
[Test] | ||
public void TestSettingsSave() | ||
{ | ||
Assert.IsTrue(String.IsNullOrEmpty(XRPackageInitializationSettings.s_ProjectSettingsPath)); | ||
Assert.IsTrue(String.IsNullOrEmpty(XRPackageInitializationSettings.s_PackageInitPath)); | ||
|
||
Assert.IsFalse(Directory.Exists(XRPackageInitializationSettings.s_ProjectSettingsPath)); | ||
Assert.IsFalse(File.Exists(XRPackageInitializationSettings.s_PackageInitPath)); | ||
|
||
XRPackageInitializationSettings.Instance.AddSettings("TestTestTest"); | ||
Assert.IsTrue(XRPackageInitializationSettings.Instance.HasSettings("TestTestTest")); | ||
|
||
XRPackageInitializationSettings.Instance.SaveSettings(); | ||
|
||
Assert.IsTrue(Directory.Exists(XRPackageInitializationSettings.s_ProjectSettingsPath)); | ||
Assert.IsTrue(File.Exists(XRPackageInitializationSettings.s_PackageInitPath)); | ||
|
||
XRPackageInitializationSettings.Instance.AddSettings("AgainTestTestTest"); | ||
|
||
XRPackageInitializationSettings.Instance.LoadSettings(); | ||
|
||
Assert.IsFalse(XRPackageInitializationSettings.Instance.HasSettings("AgainTestTestTest")); | ||
Assert.IsTrue(XRPackageInitializationSettings.Instance.HasSettings("TestTestTest")); | ||
} | ||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters