Hey, I’m building a custom package to share my custom asset between several projects.
I’m developing my lib in [ProjectName]/Assets/com.cqtd.customtool/…
with com.cqtd.customtool/package.json.
And other projects import that package.json from the Assets folder of lib dev projects.
Can I set the directories like this? or do I have to create a custom package in the Packages folder?
I want to develop my lib in the Assets folder like this and import this at other projects as a custom package.
MyCustomLib/Assets/com.cqtd.customtool/package.json
Or do I HAVE TO set directory like this?
MyCustomLib/Packages/com.cqtd.customtool/package.json
As described in the Unity Manual, a custom package must be located under the Packages directory to be properly registered as an embedded package by the Package Manager. If it’s under Assets, it will not be recognized as a package at all.
You can also reference it with a "file:<path-to-package>" dependency, also described in the Unity Manual.