- Home /
how to combine Custom Package + Addressables?
Hey everybody, I've been trying to learn this from the docs but it looks like there's a gap when trying to serve some kinds of assets through a package.
What our team would like to achieve is this:
Create a custom package with all kinds of assets, that will be distributed through the Samples~ folder as explained here: https://forum.unity.com/threads/samples-in-packages-manual-setup.623080/
We want some these assets to be Addressable so that they can be loaded easily.
In previous implementations, where there was no custom package, these assets were bundled and stored in StreamingAssets. But we can't use this anymore with the Package system.
In the future we'd like to distribute our package, and have a remote server that would serve all kinds of assets. So the assets wouldn't be distributed in the Samples~ folder anymore. The question is, can we distribute Addressables configuration files so that when the package is imported, the project could connect to our CDN? The challenge here is that the assets are not generated as part of the current project, but they would be provided by the installed package through a CDN that belongs to us.
Any suggestions are very welcome!!!
Thanks
Gonzalo
Did anyone figure this out? It's been almost a year!!! I can't find any docs on this
Answer by eduardo28th · Sep 11, 2020 at 12:15 AM
Hi, did you find a way to do it? I have the same problem. Thanks @gnp89 ,Did you find a way to do it? I have the same problem. Thanks @gnp89
Answer by gnp89 · Nov 23, 2020 at 04:41 PM
Hey, no I haven't. We end up using asset bundles, and the user needs to drag n drop some files from our package to their StreamingAssets folder. Definitely not what we initially had in mind when using Packages.
Answer by Ciryus · Mar 10, 2021 at 10:53 AM
Hey, Have you tried adding dependency in your package.json? (in your package folder) example:
{
"name": "com.company.MyPackage",
"displayName": "MyPackage",
"version": "0.0.6",
"description": "This package contains what I want.",
"license": "UNLICENSED",
"unity": "2019.4",
"author": {
"name": "Company",
"email": "devs@company.com",
"url": "http://company.com/"
},
"dependencies": {
"com.company.otherpackage": "2.1.0",
"com.unity.addressables": "1.16.16"
}
}
Your answer
Follow this Question
Related Questions
Is there a way to set the Addressables Remote Load Path in runtime? 0 Answers
How do I make my textured models pull the source images for the textures in a package? 0 Answers
How to use Addressables to Organize voice over data 0 Answers
Asset bundles caching.IsversionCached() always returns false 1 Answer