I’m working on a custom package and put in place some samples for it.
My pacakge depends on other packages like enitties but I don’t need anything in regard to rendering.
Owerver, I would like to add some visual elements to my sample so I want the samples to use hybrid renderer and vfx graph.
How can I define the depednacy on the sample without changing the package’s own dependancies ?
I pretty sure I saw somewhere an option to make the sample into a distinct package (to limit the import size) but I can’t find it anymore… I hoped to use that to add the dependancy to the package.json of the sample.
It’s currently not possible to add dependencies to a package and have them only considered then the samples from that package are imported. However you can create a separate package that contains only your samples, and has all the required dependencies (including a dependency on your main custom package). That Samples package would need to be added manually to the project by users. The steps to manually create package samples can be found here: https://discussions.unity.com/t/730846