Search Unity

Unity UI Where is the Unity UI source now?

Discussion in 'UGUI & TextMesh Pro' started by paulatwarp, Jul 2, 2018.

  1. paulatwarp

    paulatwarp

    Joined:
    May 17, 2018
    Posts:
    135
    It used to be on BitBucket but the latest tagged version there is 2017.3.

    I thought it might be included in the reference source on GitHub but if it's in there, I'm not seeing it.
     
  2. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    Hi and welcome to the forum,

    The bitbucket link is still the correct one as far as I know. Also before unity 2018 it oftentimes took them some time to update the repo, so I guess at some point you will find 2017.4 and 2018 there as well.
     
  3. stgs73

    stgs73

    Joined:
    Mar 23, 2015
    Posts:
    59
    Ya, we're needing the UI latest, i see commits in bitbucket but there is no 2018.1 branch etc
     
  4. stgs73

    stgs73

    Joined:
    Mar 23, 2015
    Posts:
    59
    Any update to this? We're still using the 2017.3 for overriding some UI for the 2018.2 builds..:/
     
    paulatwarp likes this.
  5. jweidenbach

    jweidenbach

    Joined:
    Dec 29, 2018
    Posts:
    54
    Sorry to resurrect an old thread, but I'm looking to this now as well, with the change to distribution for the ugui package with 2019.2. Up through 2019.1, I've been happily patching the source from bitbucket for my slightly modified UI (I had to override BaseEventData to support passing controller/playerid data so we could work with multiple users on the same UI). I've tried multiple times to just write my own EventData to pass, and it seems the only way to work with stock UI elements for our needs is to modify the actual ugui dll. About 3 lines of code change in total, but necessary for our needs.

    I know with packages we can theoretically use local packages or at least custom repo sources, so this change is welcome overall, but to do so I need the package-friendly source to apply my changes to, else I'm stuck in 2019.1.
     
  6. jweidenbach

    jweidenbach

    Joined:
    Dec 29, 2018
    Posts:
    54
    I do suppose for the moment I could drop my custom DLL's in a plugin directory (provided it's possible to disable the ugui package so my source can link), but obviously the package route would be cleaner.
     
  7. jweidenbach

    jweidenbach

    Joined:
    Dec 29, 2018
    Posts:
    54
    Having dug a bit further, I can't do that workaround, as TextMeshPro and InputSystem (which are both used) are dependent on it.

    With that said, I _am_ able to copy the folder from my local install into another directory, set up a git repo on it, and then re-add it to a project locally. I can probably use this to change my active project's manifest under the hood before reloading (which should get me to where I need to go for now. That being true, I don't necessarily like being cut off from updates, so it's probably still important to get access on the main repo.
     
  8. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    I guess a cleaner solution would be to create your own repo on e.g. github with the source code in there and then using this repo as your included package. By keeping an upstrea branch for all changes that unity makes it should be possible to reapply your changes by merging them from another branch.

    To include the package to your manifest there is an awesome little tool over here: https://github.com/mob-sakai/UpmGitExtension
     
  9. jweidenbach

    jweidenbach

    Joined:
    Dec 29, 2018
    Posts:
    54
    Thanks for that, I'll take a look!

    Yeah, I've got a fork of the source on bitbucket (Unity UI's a mercurial repo, so github's right out for now unfortunately). But, it's only updated to 2019.1 (and that update is from June), and doesn't have the package layout - it's still the old version that's designed to build and copy the DLL to the main unity install. I'm happy to keep updating manually in the meanwhile, but can't wait 2-3 months to update the repo when I move ahead on the Unity version. We're targeting 2019.3 for our release most likely, so need to stay on top of changes as they happen.

    The silver lining here is that this seems mostly to be in maintenance mode, so I _should_ be safe just keeping things running and waiting for the updates.
     
  10. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I've had to change the source code with every minor Unity 2019.4 update until 2019.4.16 because of a bug in Scrollbar.cs (and a few other classes) that caused a warning each time the editor started up. This was easy because double-clicking the warning took me right to the source code.

    Now, I had to look up something else and so I came across this thread. All the built-in packages are available in this path (assuming you have installed Unity into the default path):

    C:\Program Files\Unity\Hub\Editor\2019.4.16f1\Editor\Data\Resources\PackageManager\BuiltInPackages\

    Not sure which version this started with but I'd assume either 2019.3 or earlier. Oh ... and in my project, it even shows up under Packages:

    upload_2020-12-21_11-30-31.png
    That's pretty cool.

    Also, unlike with regular packages, changes to the built-in packages are persistent (until the next Unity update). The safer way, of course, is copying the whole thing to some safe, version controlled location or use an official repository (which apparently doesn't exist at the moment), and then hook it up in manifest.json ...
     
    jakovd and vozcn like this.