Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [3.0.4-preview.1] - 2019-09-20
* Public API InitializeLoaderAsync was erroneously made internal. Move back to being publicly accessible.
* Fix editor application perf issue due to not unhooking update callback.
  • Loading branch information
Unity Technologies committed Sep 19, 2019
1 parent ef0878d commit 9c08282
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [3.0.4-preview.1] - 2019-09-20
* Public API InitializeLoaderAsync was erroneously made internal. Move back to being publicly accessible.
* Fix editor application perf issue due to not unhooking update callback.

## [3.0.3] - 2019-08-29
* Fix package dependency version for subsystem registrion pacakge.

Expand Down
3 changes: 1 addition & 2 deletions Editor/XRPackageInitialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ static PackageInitializationBootstrap()

static void BeginPackageInitialization()
{
EditorApplication.update -= BeginPackageInitialization;

foreach (var t in TypeLoaderExtensions.GetAllTypesWithInterface<XRPackageInitializationBase>())
{
Expand All @@ -132,8 +133,6 @@ static void InitPackage(XRPackageInitializationBase packageInit)
if (PackageInitializationSettings.Instance.HasSettings(packageInit.PackageInitKey))
return;

EditorApplication.update -= BeginPackageInitialization;

if (!InitializeLoaderInstance(packageInit))
{
Debug.LogWarning(
Expand Down
18 changes: 16 additions & 2 deletions Runtime/XRManagerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,20 @@ public T ActiveLoaderAs<T>() where T : XRLoader
return activeLoader as T;
}


internal void InitializeLoaderSync()
/// <summary>
/// Iterate over the configured list of loaders and attempt to initialize each one. The first one
/// that succeeds is set as the active loader and initialization immediately terminates.
///
/// When complete <see cref="isInitializationComplete"> will be set to true. This will mark that it is safe to
/// call other parts of the API. This does not guarantee that init successfully created a loader. For that
/// you need to check that ActiveLoader is not null.
///
/// Note that there can only be one active loader. Any attempt to initialize a new active loader with one
/// already set will cause a warning to be logged and immediate exit of this function.
///
/// This method is synchronous and on return all state should be immediately checkable.
/// </summary>
public void InitializeLoaderSync()
{
if (activeLoader != null)
{
Expand Down Expand Up @@ -169,6 +181,8 @@ internal void InitializeLoaderSync()
///
/// Note that there can only be one active loader. Any attempt to initialize a new active loader with one
/// already set will cause a warning to be logged and immediate exit of this function.
///
/// Iteration is done asynchronously and this method must be called within the context of a Coroutine.
/// </summary>
///
/// <returns>Enumerator marking the next spot to continue execution at.</returns>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.unity.xr.management",
"displayName": "XR Management",
"version": "3.0.3",
"version": "3.0.4-preview.1",
"unity": "2019.2",
"description": "Package to provide for simple management of XR plugins. Provides help and management for loading, initialization, settings, and build support for XR plugins.",
"keywords": [
Expand All @@ -18,7 +18,7 @@
"repository": {
"type": "git",
"url": "[email protected]:unity/xr.sdk.management.git",
"revision": "89119f7ca41b3783d6d622f5594618526d933d09"
"revision": "d7fb91c38136b243b79e3fde61895e22ca5004b3"
},
"samples": [
{
Expand Down

0 comments on commit 9c08282

Please sign in to comment.