Hi,
I’ve been getting into the Unity UI system of late and finding I need to make modifications to the source code and thus rebuild the dll’s. However i’ve had very limited experience of building dll’s in the past and much of what I have done I appear to have forgotten, add in getting use to VS2013 and its all be rather confusing.
This has led me to a number of questions about the process which i’m hoping some kind souls can put me straight on since googling doesn’t provide any answers.
EditorConfig
It was easy enough to download and install editorconfig, however even after restarting VS2013 and reloading the UI project I find myself unsure if the formatting is actually correct. I would expect that when editing existing source files that tabbing should result in the same format/layout as the original, but that is not what i’m seeing. For example in the Selectable.cs file i’ve added a new public field but after the type decleration and tabbing to try and match the existing public field ( e.g. navigation entry) i’m always one character space short!
e.g.
Existing formatting in file
public Navigation navigation { get { return m_Navigation; } set { if (SetPropertyUtility.SetStruct(ref m_Navigation, value)) OnSetProperty(); } }
My line
public bool navWrapAround { get { return m_Navigation; } set { if (SetPropertyUtility.SetStruct(ref m_Navigation, value)) OnSetProperty(); } }
So is this correct? If not any idea what could be wrong?
Ok i’m obviously missing something here since whenever I alter a line VS2013 reformats removing all tabs. Will investigate further.
Location of dll’s to replace
So the readme explains where to replace the dlls, although the use of {Unity Version} at the end of the folder name seems wrong?
Data\UnityExtensions\Unity\GUISystem{UNITY_VERSION}
So here I would expect to find a version number folder within GUISystem ( i.e. GUISystem /Unity 5.1 or something), but there is none. Further more I wouldn’t expect per Unity version sub-folders at that level, not when the UnityExtensions folder itself is within a specific Unity application install. This would make senese to me if the UnityExtensions were stored in a user folder e.g. (AppData/Roaming or AppDataLocal or even User/Documents) and indeed having it split by version number in these places would certainly make the process of building, copying and keeping these extension dlls so much easier to work with. Afterall these days i’m finding i’m upgrading Unity very frequently, sometimes every two weeks with patch fixes and having to remember to replace those dll’s each time is a pain.
Hmm on further searching I’ve seen other posts where users have referenced the folder including a version number, so perhaps this behavior has changed ( using Unity 5.1.2 ) and the Unity UI readme has not been updated?
Additional files
However my real issue from looking in the Data\UnityExtensions\Unity\GUISystem\ folder is that it contains several files that are not mentioned in the readme and i’m unsure if anything must be done with these when updating dlls? For example we have
- ivy.xml
- UnityEngine.UI.dll.mdb
- UnityEngine.UI.xml
- UnityEditor.UI.dll.mdb
- UnityEditor.UI.xml
What are these additional files and are they important? I guess that mdb is some debug database and the dll.xml files appear to provide text based loook up information for each class/method. However i’m unsure how to build these, certainly making a debug build in VS2013 doesn’t generate the mdb file ( you get a pdb as you might expect ).
Then there is the question of the ivy.xml file that includes guid values, but I can’t see this guid in the project files. Are these important? Are they meant to be linked to the dlls?
Plus in the Standalone subfolder we have what I thought were exact duplicates of UnityEngine.dll, but the filesize ( not size on disk ) is slightly different to those one level up in the directory?
So specific questions on this point
- Can I just replace the dll files in Data\UnityExtensions\Unity\GUISystem or should I somehow be regenerating the mdb, ivy.xml and other xml files?
- How to generate the mdb, ivy.xml and other xml files?
- Why is there an absolute size difference betwen the GUISystem UnityEngine.UI.dll and the one in Standalone?
- Are there any good methods for removing the pain of frequent uninstall/install new Unity version and thus losing you custom UI.dll’s?
Thanks