Editor-agnostic built-in package check #363
Replies: 9 comments 4 replies
-
Obviously this only gives us a yes/no of whether the package is built-in but does not get us closer to getting the packages |
Beta Was this translation helpful? Give feedback.
-
@favoyang thoughts on this? |
Beta Was this translation helpful? Give feedback.
-
One special case that can cause problems here are packages that are only built-in for some editors/package versions. For example Then there are also packages like So the built-in check can not be done for a whole package, but only specific versions of it. |
Beta Was this translation helpful? Give feedback.
-
I am also current working on overhauling the output of the Here are some examples using this new approach. openupm deps com.unity.xr.interaction.toolkit --deep
openupm deps com.unity.postprocessing@14.0.9 --deepSee #133
openupm deps com.unity.polyspatial --deepSee #133
Seems about right, no? |
Beta Was this translation helpful? Give feedback.
-
Made a draft PR so you can look at the code: #364. It still uses the current dependency output formatting |
Beta Was this translation helpful? Give feedback.
-
You have listed all the possibilities for 1 Ship-with-editor package (Core + Buit-in) and Unity registry package
2 Other Unity package (use
3 Non-Unity package
A reliable way to check if a package is a Unity package would be
The proposal to use the Manual URL to verify the Unity package seems a tricky way. Though it may not that reliable if Unity changes the website restructure. |
Beta Was this translation helpful? Give feedback.
-
Another note. It initially seemed like the above method looks up whether the packaege is a unity package, regardless of editor. This is not correct. When using the basic manual url it will look up the latest lts editor version, as can be seen here. When using a different version, for example here 2020.2 the url changes to include the version. |
Beta Was this translation helpful? Give feedback.
-
Personally I feel like checking whether a doc page exists to determine if a package is an official Unity package, seems reliable enough. If you agree @favoyang I would finish implementing this. If not, then we can look for some other way. |
Beta Was this translation helpful? Give feedback.
-
The related PR #364 is now closed an merged. Closing the discussion |
Beta Was this translation helpful? Give feedback.
-
I just thought of an idea for checking whether a package is built-in without having to have any editor installed. I would like a sanity check on this to see if I am mistaken or missing anything.
Lets take three example packages:
So first built-in packages are not found on the unity package registry. So if we make requests to the unity registry with all three packages we get: 1 exists, 2 and 3 don't exist. So based on that 1 is not a built-in package, but 2 and 3 are.
But this obviously misses packages which don't exist on the unity registry, not because they are built-in, but because they don't exist at all. So we also need a way to determine if a package is an official unity package. For this I propose checking if there is a manual page for it, so for example
https://docs.unity3d.com/Manual/com.unity.xr.interaction.toolkit.html
and so on. For the example packages here, a web request to the corresponding manual page will return 200 for 1 and 2 and 404 for 3.So a package is built-in if A. a manual page for it exists and B. it does not exist on the unity registry.
Beta Was this translation helpful? Give feedback.
All reactions