New reply helped me find this older thread, which might be the closest thing to answering my question: Can you have packages be dependent on Asset store packages?
In case the link disappears, here’s the most important info:
- “You cannot have a dependency on a .unitypackage”
- “The long term goal is for the Asset Store to move to the new UPM format so one day you’d be able to add a dependency on your favourite Asset Store packages”
- “But as of today, the scenario you describe isn’t really possible without a hacky workaround”
The best workaround I have for now is to make a locally stored project that only contains the plugins downloaded from the asset store/package manager, then copy the assets needed to the newly cloned main project wherever they need to be, then open Unity and let it do its thing.
(Alternatively, and most simply, one could just commit the assets to their repository, but that obviously breaks my requirement of not doing that. Anyone intending to do this should read the licenses of each package to make sure all contents are covered under Creative Commons or MIT or something, particularly if your repository will be public.)
As for defining what packages a project uses, I intend to note the required assets in a project’s README file. There’s probably a better solution, but I’ve run out of investigation time on this issue for now.
EDIT:
The approach below may run into trouble if the packages have their own installers or if you have to change script execution order to make packages work. This may be because files (including meta files) under packages are considered immutable by Unity.
One other thing I found is you can have dependencies which link to a git repository. The two most interesting things in that article are 1. it looks like you could host some files on localhost, and 2. you can specify a path for when the files you need aren’t at the root of the repository. More information here: Unity - Manual: Git dependencies and Unity - Manual: Local folder or tarball paths.
Using that approach, you could in theory host your own Git repository with the store/UPM assets on it and only pull the ones you need per project. This would meet all the original requirements, plus it would remove the README bit I mentioned above (the assets would be listed in the Unity project’s manifest.json). Might be an option for projects where more than one person works on them.
Possibly overkill, but putting the info out there in case it helps anyone.