From dd64aae567004215cf6ce6b14eb1eacd23f64de6 Mon Sep 17 00:00:00 2001 From: Unity Technologies <@unity.com> Date: Wed, 28 Aug 2019 00:00:00 +0200 Subject: [PATCH] com.unity.addressables@1.1.10 ## [1.1.10] - 2019-08-28 - Fix for all files showing "Missing File" in the addressables window. - Fix for waiting on a successfully done Task --- CHANGELOG.md | 4 ++++ Editor/Settings/AddressableAssetEntry.cs | 8 +++----- .../AsyncOperations/AsyncOperationBase.cs | 13 ++++++++++--- package.json | 4 ++-- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db6f3ae1..f9bbcbbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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). +## [1.1.10] - 2019-08-28 + - Fix for all files showing "Missing File" in the addressables window. + - Fix for waiting on a successfully done Task + ## [1.1.9] - 2019-08-22 - Fixed drag and drop NullRef in main addressables window. - Fixed AudioMixer type assets getting stripped from bundles. diff --git a/Editor/Settings/AddressableAssetEntry.cs b/Editor/Settings/AddressableAssetEntry.cs index 29f5b883..a9464554 100644 --- a/Editor/Settings/AddressableAssetEntry.cs +++ b/Editor/Settings/AddressableAssetEntry.cs @@ -150,7 +150,7 @@ internal Type MainAssetType { m_mainAssetType = AssetDatabase.GetMainAssetTypeAtPath(AssetPath); if (m_mainAssetType == null) - m_mainAssetType = typeof(object); + return typeof(object); // do not cache a bad type lookup. } return m_mainAssetType; } @@ -252,13 +252,11 @@ public string AssetPath { get { - - if (m_cachedAssetPath == null) + if (string.IsNullOrEmpty(m_cachedAssetPath)) { if (string.IsNullOrEmpty(guid)) m_cachedAssetPath = string.Empty; - - if (guid == EditorSceneListName) + else if (guid == EditorSceneListName) m_cachedAssetPath = EditorSceneListPath; else if (guid == ResourcesName) m_cachedAssetPath = ResourcesPath; diff --git a/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs b/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs index 2d1aace4..583b86b5 100644 --- a/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs +++ b/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs @@ -171,14 +171,21 @@ internal System.Threading.Tasks.Task Task { get { - if(IsDone) - return System.Threading.Tasks.Task.FromResult(default(TObject)); + if (Status == AsyncOperationStatus.Failed) + { + return System.Threading.Tasks.Task.FromResult(default(TObject)); + } + if (Status == AsyncOperationStatus.Succeeded) + { + return System.Threading.Tasks.Task.FromResult(Result); + } var handle = WaitHandle; return System.Threading.Tasks.Task.Factory.StartNew(o => { var asyncOperation = o as AsyncOperationBase; - if (asyncOperation == null) return default(TObject); + if (asyncOperation == null) + return default(TObject); handle.WaitOne(); return asyncOperation.Result; }, this); diff --git a/package.json b/package.json index 19360088..1fe49d52 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.unity.addressables", "displayName": "Addressables", - "version": "1.1.9", + "version": "1.1.10", "unity": "2018.3", "description": "The Addressable Asset System allows the developer to ask for an asset via its address. Once an asset (e.g. a prefab) is marked \"addressable\", it generates an address which can be called from anywhere. Wherever the asset resides (local or remote), the system will locate it and its dependencies, then return it.\n\nUse 'Window->Asset Management->Addressables' to begin working with the system.\n\nAddressables use asynchronous loading to support loading from any location with any collection of dependencies. Whether you have been using direct references, traditional asset bundles, or Resource folders, addressables provide a simpler way to make your game more dynamic. Addressables simultaneously opens up the world of asset bundles while managing all the complexity.", "keywords": [ @@ -18,6 +18,6 @@ "repository": { "type": "git", "url": "git@github.cds.internal.unity3d.com:unity/Addressables.git", - "revision": "c70f6073684c7fb939e79fb88ff1d10697698184" + "revision": "feeab367b101a12d5a04960d0d9b20b267c5726d" } }