Package Manager using git repo
Hello,
We recently switched to Unity 2018.3.0. The package manager is a great improvement. however I can't manage to make it download a package on our repository. In the manifest.json, I tried both https and ssh urls. I always get errors like
...does not point to a valid package repository. No package manifest was found. Verify the repository URL and make sure the package is located in the root folder of the repository.
What would the exact syntax be?
What I tried:
"dependencies": {
"com.mycompany.mypackage": "https://bitbucket.org/companyname/projectrepo.git",
...other unit packages
}
also tried
"com.mycompany.mypackage":"git://bitbucket.org/companyname/projectrepo.git",
"com.mycompany.mypackage":"git:bitbucket.org/companyname/projectrepo.git",
"com.mycompany.mypackage":"git@bitbucket.org/companyname/projectrepo.git",
"com.mycompany.mypackage": "git@bitbucket.org:companyname/projectrepo.git",
Answer by JimmyCushnie · Dec 21, 2018 at 08:59 AM
OK, I've finally figured this out. Your git repo:
needs to have a
package.json
file at the top level (see here for the structure of this file)needs to use assembly definition files
needs to NOT have ANY
.meta
files in its gitignore
Here is an example of a git repo that works as a package.
I think my project satisfies what you said.But it does not work. When i use my empty unity project to load your git.It does not work as well.Would you like to help me?
Answer by Tsinning · Jan 14, 2021 at 07:16 AM
Do like this, "dependencies": { "com.mycompany.mypackage": "https://bitbucket.org/companyname/projectrepo.git#1.0.0", `` or "com.mycompany.mypackage": "https://bitbucket.org/companyname/projectrepo.git?path=/Assets/TestUPM" } the version number is what your subtree tag is. the folder is where your package.json is.
Your answer
Follow this Question
Related Questions
Asset Store Tools doesn't find my packages 1 Answer
Can't Find Downloaded Packages 0 Answers
VSCode Index Out Of Range On New Project (Unity 2019.3.0f6) 2 Answers
ProBuilder Not Found Under Packages 1 Answer
How to export a package for Xbox? 0 Answers