Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
NagaChiang committed Sep 4, 2020
2 parents fef93db + 8278a8c commit 5253eb2
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ public static RegistrySettings Instance()
if (PrivateInstance == null)
{
PrivateInstance = Resources.Load<RegistrySettings>(RESOURCES_PATH);
PrivateInstance.Init();
if (PrivateInstance)
{
PrivateInstance.Init();
}
}

return PrivateInstance;
Expand Down
25 changes: 16 additions & 9 deletions Assets/HTC.VIVERegistryTool/Editor/Scripts/System/RegistryCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,32 @@ public class RegistryCheck
{
static RegistryCheck()
{
if (EditorApplication.isPlayingOrWillChangePlaymode || EditorApplication.isUpdating)
if (EditorApplication.isPlayingOrWillChangePlaymode)
{
return;
}

if (RegistrySettings.Instance().AutoCheckEnabled)
{
EditorApplication.update += UpdateOnce;
}

EditorApplication.update += OnUpdate;
}

private static void UpdateOnce()
private static void OnUpdate()
{
if (!ManifestUtils.CheckRegistryExists(RegistrySettings.Instance().Registry))
if (EditorApplication.isUpdating)
{
return;
}

if (!RegistrySettings.Instance())
{
return;
}

if (RegistrySettings.Instance().AutoCheckEnabled && !ManifestUtils.CheckRegistryExists(RegistrySettings.Instance().Registry))
{
RegistryUpdaterWindow.Open();
}

EditorApplication.update -= UpdateOnce;
EditorApplication.update -= OnUpdate;
}
}
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [Unreleased]

## [1.1.1] - 2020-09-14

### Fixed

- Very likely to fail to popup after being imported

## [1.1.0] - 2020-08-19

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ If you want to see packages in preview, remember to check `Show preview packages

### Switching to My Registries

Only in Unity 2020.1 and newer, packages from scoped registries will be listed in another place called `My Registries`.
In Unity 2019.4.6 and newer, packages from scoped registries will be listed in another place called `My Registries`.

![](https://i.imgur.com/gAWlUAF.png)

Expand Down

0 comments on commit 5253eb2

Please sign in to comment.