Same question here. And why the Addressable.Instantiate is not generic anymore? What if I want to instantiate Material and not only gameObject?
A workaround would be LoadAsset<Material> and then just Object.Instantiate(loadedMaterial) Heres the changelog: https://docs.unity3d.com/Packages/com.unity.addressables@0.6/changelog/CHANGELOG.html Release page is now live too: https://forum.unity.com/threads/release-announcements-and-notes.543537/#post-4287979
The problem with the original API is that it works for GameObject and for standalone assets but silently fails on components. Since 5.0 it is no longer possible to instantiate a prefab via Instantiate<T>() where T : Component off an AssetBundle. Stopping this means that Instantiate has to be not allowed on T : Component. Problem is, Material, etc. are all derived from Object, which makes it tricky to stop it for Component and not stop it for Material and other native assets.
it could be resolved internally with: - try to load/instantiate T - if it fails, try to load/instantiate GameObject, then .GetComponent<T>() (do not check T is Component, because interfaces are allowed in GetComponent) until then, you can write an extension/wrapper method that does that
That does sound a bit icky. Maybe it could be solved in a cleaner way by storing some type metadata on the catalogue.