Extending UI System 5.2

Hi

I’m currently working on a 5.0 project where I have modified the UI System dll to create custom behaviour. Among other things I’ve added a DataGrid UI control, which is now a large part of most of the scenes involved in the project.

The UI System source was downloaded from the Mercurial repository:
https://bitbucket.org/Unity-Technologies/ui/commits/all

Upgrading to 5.2 is currently not possible since the 5.1 UI Source is not available via the Mercurial repository. If I upgrade the project, I’m missing all my custom changes in the UI System dll - if I recompile the dll, I’m missing all the new features of 5.2.

Is there a solution to this? Can I get the 5.2 UI Source somewhere, or am I bound to wait for an actual release of the 5.2?

(I’m okay with not having bug fixes between each minor version released during the Beta, but in the case of 5.2, the Dropdown component has been added, which is something I would like to try/test.)

/Andreas

1 Like

Hi Andreas.

We’ll ship the 5.2 source for the UI when we release 5.2 final. It will be available.

Hi Tim,

The project Andreas is working on also use WebRequest, which currently only is available in 5.2, but since we can’t build UI, we end up in a catch-22 situation.

According to Platform roadmaps | Unity it seems that we have to wait until mid-September which is aggravating, but I guess that it’s just something we have to work around.

Best Regards,
Thomas Hagen

I’ve put the 5.2 beta5 (not yet out) UI code dump on my private bit bucket here:
https://bitbucket.org/stramit/ui/branch/5.2

It’s unsupported and all that, but can probably help you out.

2 Likes

Awesome! Thank you very much Tim.
I’ll give it a whack and see what happens.

Thanks for that Tim. Should prove useful since i’ve just started to dig into UI System source myself, so it will be nice to get ahead of the curve a bit and see what is changing in 5.2.

However i’m having some problems/confusion in general with regards to using the source and building the necessary files. I have no problem building the dll’s from the Unity 5.1 version, but I noticed there are other files in Unity install (GUISYstem folder) like xml and mdb that have no explanation ( and I’ve limited experience building dll’s). I’m also thinking the bitbucket readme is a bit outdated since it claims there should be a version folder within GUISystem folder and there is none?

If you have a moment perhaps you could or someone else familar with Unity UI Source could give some answers or guidance to my post here ‘understanding-the-requirements-to-build-and-replace-unity-ui-dlls’. Maybe even consider updating the bitbucket readme to help explain these files and how to build them if they are required.

Thanks

I think what might have happened is a build related person changed how the dll loading worked and didn’t tell me :wink: I’ll investigate and update the readme :slight_smile:

I have investigated:

the mdb is the ‘debug data’ associated with the dll, not needed but can help. If you build with visual studio this will be a pdd file instead.

Correct. I have updated the readme.

1 Like

Got the 5.2.0b5 UI code to compile together with my UI changes. Wasn’t really all that much I had to change once I got the new source from you.

Noted that the comment in all the csproj (UnityEngine.UI, UnityEditor.UI and UnityEngine.UI-Editor) files needs to be updated, since it refers a 4.6.0 Version folder (same as the readme file)

Anyway, everything compiles, but once I start up Unity 5.2.0b4 I get swamped with weird exceptions, such as:
“MissingMethodException: Method not found: ‘UnityEngine.Camera.get_pixelWidth’.”
and
“MissingMethodException: Method not found: ‘UnityEngine.Input.get_mouseScrollDelta’.”

Both of these functions exists in the UnityEngine dll (both in Beta5, Beta4 and previous), so I’m a bit at a loss what the problem could be. Got any hints or suggestions?

Since all errors I’m getting are only related to the UI, I assume it is caused by the UnityEngine and UnityEditor dll files located in the lib folder of your source repository - I’m guessing they are 5.2.0b5.

Once I compile the UI source and replace the files in the installed Unity version (5.2.0b4), the new UI dll cannot reference the needed functions, since the UnityEngine.dll is a different version. This sounds plausible to me, but I’m not really that much at home with dll’s - and I doesn’t give me a solution (besides replacing all the “old” dlls in the Unity install folder with the “new” ones from the 5.2.0b5 UI repository. And I don’t really know where that will land me).

Aaand, just to keep talking to myself; replacing all the UnityEngine.dll wont really work since most of them are located in the “variations” folder, which, I guess from the naming, is compile to a specific native platform.

Meh.

Build against the one in Editor\Data\Managed.

Thanks for the reply. That path is not getting me anywhere. Cannot seem to find any folder path containing Editor/Data/Managed in the Unity application folder.
(On a Mac, if that matters)

Plenty of Managed folders, but non with “Editor” before it.

I guess that’s Windows only path :). Editor is the root folder of installation on Windows - that’s where the executable is. Probably Unity.app on Mac?

Either case, the managed folder you want will have UnityEditor.dll next to UnityEngine.dll and couple others.

The code won’t work till you get your hands on beta 5. Like I said when I posted the link :wink:

The path on Mac is:
Unity.app/Content/Frameworks/Managed/
(Only place an UnityEditor.dll file is located in the Unity folder structure.)

@anon_35347745 : And right you were =). Getting all kinds of errors if I compile against the Beta4 dlls.
Going forward it would still be nice to have the source code for the newest UI build, available at the release of each beta release (similar to the repository you set up in the beginning of this thread).

Thank you both for your help. I’m just going to wait patiently for Beta 5 release.