I have just integrated Addressables into a test project, where it works (temporary 2019.1.1f1 project, LWRP)
When porting the temp solution into my existing project (will call this one “Main project”, originally 5.x 2D project that was over time upgraded to 19.1.1f1), i got:
The type or namespace name 'AsyncOperationHandle<>' could not be found (are you missing a using directive or an assembly reference?)
But everything ported fine, i have literally imported the same class (and imported the Addressables package etc), so stuff like
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement;
is included. Everything else works fine. Any ideas?
EDIT: for some reason, the up-to-date versions of packages in the temp project and the main project are different. Packages in both report “up to date” and can not be further updated.
Temp project (fresh 19.1.1f1 LWRP):
Addressables: 0.8.4
Dependency: > Scriptable Build Pipeline 1.4.1-preview (installed)
Main project (old 2D made new 19.1.1f1):
Addressables: 1.0.2
Dependency: Scriptable Build Pipeline 1.3.1-preview (1.4.1-preview installed)
When you look closely, it seems counter-intuitive for newer version (just the version number) of Addressables to be dependant on older SRP (?), but that’s what it says.
Also after further testing, while AsyncOperationHandle is recognized in Temp project, it is not recognized in the Main project, however UnityEngine.ResourceManagement.AsyncOperations.IAsyncOperation is recognized in the Main project, which leads me to believe that 1.0.2 is simply older version of Addressables , and 0.8.4 is newer, as @unity_bill mentioned, IAsyncOperation was replaced in favor of AsyncOperationHandle.
EDIT2:
[1.0.2-preview.2] - 2019-02-15
[0.8.4] - 2019-05-09
But when i look at the change logs, i seem to be dealing with completely different (addressables) branches i.e. it makes sense why i cant update now. The only reason why this is so that i can think of is that the Main (“Old-incrementally updated”) project is not compatible with the “new” 0.8.4 addressables, only with the 1.0.2-preview.2 ones. Idk why though.
EDIT3:
I’m starting to believe that my issue is unrelated to this thread, but maybe someone with similar setup finds it helpful later. Ive done some more tests.
Created new 2D project (19.1.1f1).
Created new 3D project (19.1.1f1).
Created new LWRP project (19.1.1f1).
Comparing packages inside Package manager, i’ve noticed that some packages are different from the Main project.
“Unity Ads” (2.0.9, Main) vs just “Ads” (2.0.8, 2D / 3D / LWRP)
“Addressables System” (preview.2-1.0.2, Main) vs “Addressables” (preview-0.8.4, 2D / 3D / LWRP)
“Burst” (1.0.3, Main) vs “Burst” (1.0.2, 2D / 3D / LWRP)
(and others)
Also tried to install “Burst” 1.0.3 into Main. Installed fine. Clicked “Changelog”. There is no mention of 1.0.3 in changelog (?) ¯_(ツ)_/¯
This is baffling, am i missing something obvious? Are there separate package forks for older code-bases of the editor or something?
I want to stay up-to-date with LWRP/HDRP and will probably port the whole “Main project” into a fresh 19.x LWRP (or HDRP) base soon, that should solve it? Is this advisable and why (or will the v1.0.2 Addressables get an update at some point so i can use AsyncOperationHandle or should i just use IAsyncOperation in my “project version” and why should i care)? Should i be clear on whether i want to have HDRP or LWRP base before i proceed with porting Main into a fresh 19.x RP, or is it possible to upgrade/downgrade (HPRP->LWRP, LWRP->HDRP)later (i’ve read somewhere that it is not)? Any more info on this situation (to better understand and learn from it) would be welcome.