Every asset I see on the asset store is self-contained, but I have a case where that seems to be silly. I’ve got a couple packages that do cool things. Both depend on a core library. Question is: how should I package this up?
So to be clear, I have a package X that does something interesting, as well as a package Y that also does something interesting, and I plan on making Z1, Z2, Z3, … You might be tempted to buy either X or Y or one of the Zi packages, or maybe several of them. At the core, there’s a library A that supports what they do. Programmers might be tempted to buy A on its own to make some other cool thing W.
I’m seeing two possibilities:
Ship A, X, and Y each as separate packages for $10 each. The pages for X and Y point out that you need to also buy A or it won’t run.
Ship X and Y each as separate packages for $20. They are completely standalone.
If you go with option 2 (which I recommend, too), please make sure the common files’ .meta files are the same in both packages. Otherwise when you import the second package Unity will complain about conflicting files.
I guess I’ll have to do some editor trickery to make sure that anybody who updates one of the packages also updates the others, if the common code gets updated.
Not sure if this will be helpful to you, but when I share common code between two projects, I actually use three projects: Common, ProjectA, and ProjectB. I set Meta Files to Visible. The master copy of the common code, as well as unit tests on that code, are in Common. I export the common code as a unitypackage and then import this unitypackage into ProjectA and ProjectB. (I prefer this to messing around with symbolic links.) I use uTomate to run the export/import process with a single click. You could do the same thing with a common code version control repository.