We are currently working with Unity 2021.2b - and need to modify some UI-Builder sources.
Before we switched to beta - uielements has been a Preview Package - so we could move it into the Packages folder and edit it easily.
However inside the beta it’s now part of Unity and doesn’t even state its version number.
Normally I’d just copy the sources from package cache - but there is no version and I don’t think that it is the last published prev. version, because there are bugs fixed in the build-in version that exist in the last preview package.
The only thing that I could come up with was to look into the unity editor sources - but there them darn packages are all build into .dlls …
So where can I find the sources of a build-in package to include it manually - or is there another way?
At the end a suggestion: How about to add a button that makes any installed package - automatically a custom one?
Wouldn’t it just to move it into the projects package folder, remove version suffix and recompile? Maybe auto add the original version number and creation / clone date into description…
This is probably more or less an expert setting - so hide it by default and put a checkbox into “Advanced Project Settings”
That there might be breaking changes when unity is updated - sure - but as it’s an expert setting - one who makes that claim should be able to address that issue if it arises . for eg. create git patch and re-customize it again… etc…
To preempt the question - why would one event want to edit a build-in package -
I guess that there are many reasons why that would be necessary in a long running project.
Our demand at hand is the incomplete inspector implementation in the ui-builder.
We know the Unity package server has failed before and it will fail in the future, so a feature like the above would come in handy.
I would make a stub project once every few months, link all the packages I regularly about, hit the MAKE CUSTOM button to get them into Assets, commit them and have a handy backup and reference.
Windows
\Data\Resources\PackageManager\Server\BuiltInPackages
Mac
/Unity.app/Contents/Resources/PackageManager/BuiltInPackages
About the lack of version problem, you are correct. We believe almost all of the built in packages have as version 1.0.0 at the moment, these packages become unversioned, which is a limitation we need to find a solution.
@UnityMaru Thanks for the solution!
Probably you could add this information to the docs … idk - maybe here:
Regarding the version number of a build-in-package - is there any other way to figure it out?
Maybe it’s possible to find it in an included text file or online somewhere?
Because, the main reason why one would copy a package is to change something in the code.
But without knowing if something has changed by a version number, the only way would be a manual code compare - which is possible of course - but not really good practice…
@UnityMaru sorry to bother you again - but - eh - in the server folder - there is only a NodeJS exe and that’s it:
However there is a path to the BuildInPackages - but only a few of them contain actual code - most just have the package.json
C:/Program Files/Unity/Editor/Data/Resources/PackageManager/BuiltInPackages/