-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore,docs: update package.json and docs to support OpenUPM #438
base: master
Are you sure you want to change the base?
Conversation
Thank you for the pull request. I have considered about OpenUPM support before when VCC hasn't come out yet. But since VCC uses an alternative approach other than using the Unity scoped registry approach. I am concerned about both Unity will try to obtain UPM packages listed in Would this cause a conflict or confuse Unity to search the packages from scoped registries while OpenUPM scope is not installed? I think Unity prioritizes project embedded packages placed inside the |
After doing some in depth testing. No, this won't cause a conflict or confuse Unity while OpenUPM scope is not installed. If user have the package installed via VCC while OpenUPM scope is installed. Unity still prioritizes However, users might be confused by package manager as it will display it's coming from a scoped registry while it's actually using a custom one placed in the Therefore, it's worth adding a recommendation for user to add the package using only one of the documented method, better not mix and match. |
Thanks for your further testing. I think there might have a few more things to address before we can merge this PR.
|
Since the project follows conventional commit, please change the commit message to |
I think we could try including this OpenUPM support into 2.6.0-beta.1 (the version coming this week). And allows you to test installing this pre-release version. P.S. Now |
I don't think we should remove the UPM Git URL and ZIP options from the docs entirely. As there might be users that still need the option to install it via Git URL or ZIP files (Eg, offline network environment, or corporate network limitation). For clarity, I recommend we can hide those options inside things like HTML
I am also not sure about the compatibility if we are trying to access a |
After testing, Unity will read files correctly from For instance, I have self-hosted a local private scoped registry using Verdaccio (My setup files). Adding the following example code to private const string PackageJsonPath = "Packages/com.chocopoi.vrc.dressingtools/package.json";
private static ParsedVersion GetLocalPackageJsonVersion()
{
try
{
var reader = new StreamReader(PackageJsonPath);
var str = reader.ReadToEnd();
reader.Close();
var packageJson = JObject.Parse(str);
+ Debug.Log("[DressingTools] package.json: " + packageJson);
...
}
...
} Published the modified package to the registry and added the package to Unity. The result is shown in the screenshot below: Packages that use a scoped registry will be imported into Unity's Asset Database just like custom packages. The only difference is that its entire package folder will be immutable. Therefore, your code can only read but not modify the content in the package. Also, due to its immutability, any files in the package that are missing their corresponding Unity We should generate those missing |
I will fix the missing meta files by promoting a new patch version for each two packages. |
Add OpenUPM support for DressingTools.
OpenUPM is a package registry for open-source Unity packages. It can handle package updates and dependencies properly compared to UPM Git URL.
Personally, I recommended to use OpenUPM for installation if user is not using VCC. Especially for users who are not using DressingTools for VRChat.
Users can benefit from automatic package updates and dependencies resolving that OpenUPM (Unity scoped registry) provides.
In order to support OpenUPM, DressingTools' dependencies
AvatarLib
andDressingFramework
have been added todependencies
property inpackage.json
.Hence, in the future user will have to install
AvatarLib
andDressingFramework
first, thenDressingTools
. Otherwise, Unity will refuse to install DressingTools because its dependencies are not fulfilled.Both English and Chinese (Traditional) documentations are updated.
For other languages, because I am not fluent in those languages, I am unable to help with those documentation.
OpenUPM page for
DressingTools
and its dependencies:DressingTools:
https://openupm.com/packages/com.chocopoi.vrc.dressingtools/
DressingFramework:
https://openupm.com/packages/com.chocopoi.vrc.dressingframework/
AvatarLib:
https://openupm.com/packages/com.chocopoi.vrc.avatarlib/