Skip to content

Conversation

@sp4ghet
Copy link
Contributor

@sp4ghet sp4ghet commented Feb 6, 2023

Tested using Unity 2021.2.0f1 as well as 2022.2.1f1.

For example, when using this package with the following manifest.json:

"dependencies": {
    "com.hecomi.hlsltoolsforvisualstudioconfiggenerator": "https://github.com/hecomi/HLSLToolsForVisualStudioConfigGenerator.git#upm",
...

The Library/PackageCache directory has the following directory for the local cache of the repository/package:

Library\PackageCache\com.hecomi.hlsltoolsforvisualstudioconfiggenerator@24c1c38f35

The packages-lock.json entry looks like this:

"dependencies": {
    "com.hecomi.hlsltoolsforvisualstudioconfiggenerator": {
      "version": "https://github.com/hecomi/HLSLToolsForVisualStudioConfigGenerator.git#upm",
      "depth": 0,
      "source": "git",
      "dependencies": {},
      "hash": "24c1c38f35bd3111c1b7962ef92870bf5748f875"
    },
...

I'm not sure how stable this behavior is in terms of backward compatibility or when the behavior changed (I assume you tested git packages on an older version of unity), but it seems the newer versions of unity use this method of caching.

@hecomi
Copy link
Owner

hecomi commented Feb 11, 2023

I created a new project locally on my Mac using Unity 2021.3.16f1 and 2022.2.6f1 (Apple Silicon) and found that the path is still based on the version rather than the hash. I would like to investigate under what conditions the hash path is used.

Screen Shot 2023-02-12 at 1 05 51

Please let me know if you discover anything regarding this matter.

@sp4ghet
Copy link
Contributor Author

sp4ghet commented Feb 12, 2023

Hi, I am running Windows 10.
Please let me know if there is some other platform info you would like.

@hecomi
Copy link
Owner

hecomi commented Feb 18, 2023

Ah, sorry! This is the case when you add the package from "Add packages from git URL...". I could reproduce it.

@hecomi hecomi merged commit 5d561c4 into hecomi:main Feb 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants