Skip to content

Commit 753fde3

Browse files
committed
Updating to Unity 5.5.0f3
1 parent 5a3055d commit 753fde3

1,762 files changed

Lines changed: 121360 additions & 74088 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33

44
This was made by decompiling UnityEditor.dll and UnityEngine.dll using [ILSpy](http://ilspy.net)
55

6-
Current version: *5.4.1f1* - other versions can be found in the [tags](https://github.com/MattRix/UnityDecompiled/tags)
6+
Current version: *5.5.0f3* - other versions can be found in the [tags](https://github.com/MattRix/UnityDecompiled/tags)
77

88
Feel free to either browse the code directly or [download it](https://github.com/MattRix/UnityDecompiled/archive/master.zip)
99

10+
Note that Unity UI is open source. Get it from [https://bitbucket.org/Unity-Technologies/ui/](https://bitbucket.org/Unity-Technologies/ui/)
11+
1012
Permission here: https://twitter.com/aras_p/status/568126504997138434

UnityDecompiled.sln

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 2013
3+
# Visual Studio 2012
44
VisualStudioVersion = 12.0.31101.0
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEngine", "UnityEngine\UnityEngine.csproj", "{731BEF47-7B99-4BB3-86B7-595906204083}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEngine", "UnityEngine\UnityEngine.csproj", "{45BFEA31-16C1-4F6A-AC9B-EFA7A5449446}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEditor", "UnityEditor\UnityEditor.csproj", "{A273AAF0-2CB5-491E-9C0D-D66717004282}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEditor", "UnityEditor\UnityEditor.csproj", "{5905B295-D0F8-4B28-92B8-DF4FB546261A}"
99
ProjectSection(ProjectDependencies) = postProject
10-
{731BEF47-7B99-4BB3-86B7-595906204083} = {731BEF47-7B99-4BB3-86B7-595906204083}
10+
{45BFEA31-16C1-4F6A-AC9B-EFA7A5449446} = {45BFEA31-16C1-4F6A-AC9B-EFA7A5449446}
1111
EndProjectSection
1212
EndProject
13+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEditor.UI", "UnityEditor.UI\UnityEditor.UI.csproj", "{0202EE81-8DBB-4C49-9668-2AC7F15E1A1D}"
14+
EndProject
15+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEngine.UI", "UnityEngine.UI\UnityEngine.UI.csproj", "{F7CDA827-F65F-486A-80A6-948FDDD88300}"
16+
EndProject
1317
Global
1418
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1519
Debug|Any CPU = Debug|Any CPU
1620
Release|Any CPU = Release|Any CPU
1721
EndGlobalSection
1822
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19-
{731BEF47-7B99-4BB3-86B7-595906204083}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20-
{731BEF47-7B99-4BB3-86B7-595906204083}.Debug|Any CPU.Build.0 = Debug|Any CPU
21-
{731BEF47-7B99-4BB3-86B7-595906204083}.Release|Any CPU.ActiveCfg = Release|Any CPU
22-
{731BEF47-7B99-4BB3-86B7-595906204083}.Release|Any CPU.Build.0 = Release|Any CPU
23-
{A273AAF0-2CB5-491E-9C0D-D66717004282}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24-
{A273AAF0-2CB5-491E-9C0D-D66717004282}.Debug|Any CPU.Build.0 = Debug|Any CPU
25-
{A273AAF0-2CB5-491E-9C0D-D66717004282}.Release|Any CPU.ActiveCfg = Release|Any CPU
26-
{A273AAF0-2CB5-491E-9C0D-D66717004282}.Release|Any CPU.Build.0 = Release|Any CPU
23+
{0202EE81-8DBB-4C49-9668-2AC7F15E1A1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{0202EE81-8DBB-4C49-9668-2AC7F15E1A1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{0202EE81-8DBB-4C49-9668-2AC7F15E1A1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{0202EE81-8DBB-4C49-9668-2AC7F15E1A1D}.Release|Any CPU.Build.0 = Release|Any CPU
27+
{45BFEA31-16C1-4F6A-AC9B-EFA7A5449446}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28+
{45BFEA31-16C1-4F6A-AC9B-EFA7A5449446}.Debug|Any CPU.Build.0 = Debug|Any CPU
29+
{45BFEA31-16C1-4F6A-AC9B-EFA7A5449446}.Release|Any CPU.ActiveCfg = Release|Any CPU
30+
{45BFEA31-16C1-4F6A-AC9B-EFA7A5449446}.Release|Any CPU.Build.0 = Release|Any CPU
31+
{5905B295-D0F8-4B28-92B8-DF4FB546261A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
32+
{5905B295-D0F8-4B28-92B8-DF4FB546261A}.Debug|Any CPU.Build.0 = Debug|Any CPU
33+
{5905B295-D0F8-4B28-92B8-DF4FB546261A}.Release|Any CPU.ActiveCfg = Release|Any CPU
34+
{5905B295-D0F8-4B28-92B8-DF4FB546261A}.Release|Any CPU.Build.0 = Release|Any CPU
35+
{F7CDA827-F65F-486A-80A6-948FDDD88300}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36+
{F7CDA827-F65F-486A-80A6-948FDDD88300}.Debug|Any CPU.Build.0 = Debug|Any CPU
37+
{F7CDA827-F65F-486A-80A6-948FDDD88300}.Release|Any CPU.ActiveCfg = Release|Any CPU
38+
{F7CDA827-F65F-486A-80A6-948FDDD88300}.Release|Any CPU.Build.0 = Release|Any CPU
2739
EndGlobalSection
2840
GlobalSection(SolutionProperties) = preSolution
2941
HideSolutionNode = FALSE
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using System.Diagnostics;
3+
using System.Reflection;
4+
using System.Runtime.CompilerServices;
5+
using System.Runtime.InteropServices;
6+
using UnityEngine;
7+
8+
[assembly: AssemblyVersion("1.0.0.0")]
9+
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
10+
[assembly: AssemblyCompany("Unity Technologies")]
11+
[assembly: AssemblyConfiguration("")]
12+
[assembly: AssemblyCopyright("Copyright © Unity Technologies 2013")]
13+
[assembly: AssemblyDescription("")]
14+
[assembly: AssemblyFileVersion("1.0.0.0")]
15+
[assembly: AssemblyProduct("guisystemeditor")]
16+
[assembly: AssemblyTitle("UnityEditor.UI")]
17+
[assembly: AssemblyTrademark("")]
18+
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
19+
[assembly: ComVisible(false)]
20+
[assembly: Guid("ad7418c3-5d25-4670-b468-8e7196596d42")]
21+
[assembly: AssemblyIsEditorAssembly]
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
using System;
2+
using UnityEngine;
3+
using UnityEngine.EventSystems;
4+
5+
namespace UnityEditor.EventSystems
6+
{
7+
[CustomEditor(typeof(EventSystem), true)]
8+
public class EventSystemEditor : Editor
9+
{
10+
private GUIStyle m_PreviewLabelStyle;
11+
12+
protected GUIStyle previewLabelStyle
13+
{
14+
get
15+
{
16+
if (this.m_PreviewLabelStyle == null)
17+
{
18+
this.m_PreviewLabelStyle = new GUIStyle("PreOverlayLabel")
19+
{
20+
richText = true,
21+
alignment = TextAnchor.UpperLeft,
22+
fontStyle = FontStyle.Normal
23+
};
24+
}
25+
return this.m_PreviewLabelStyle;
26+
}
27+
}
28+
29+
public override void OnInspectorGUI()
30+
{
31+
base.DrawDefaultInspector();
32+
EventSystem eventSystem = base.target as EventSystem;
33+
if (!(eventSystem == null))
34+
{
35+
if (!(eventSystem.GetComponent<BaseInputModule>() != null))
36+
{
37+
if (GUILayout.Button("Add Default Input Modules", new GUILayoutOption[0]))
38+
{
39+
Undo.AddComponent<StandaloneInputModule>(eventSystem.gameObject);
40+
}
41+
}
42+
}
43+
}
44+
45+
public override bool HasPreviewGUI()
46+
{
47+
return Application.isPlaying;
48+
}
49+
50+
public override bool RequiresConstantRepaint()
51+
{
52+
return Application.isPlaying;
53+
}
54+
55+
public override void OnPreviewGUI(Rect rect, GUIStyle background)
56+
{
57+
EventSystem eventSystem = base.target as EventSystem;
58+
if (!(eventSystem == null))
59+
{
60+
GUI.Label(rect, eventSystem.ToString(), this.previewLabelStyle);
61+
}
62+
}
63+
}
64+
}
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
using System;
2+
using UnityEngine;
3+
using UnityEngine.EventSystems;
4+
5+
namespace UnityEditor.EventSystems
6+
{
7+
[CustomEditor(typeof(EventTrigger), true)]
8+
public class EventTriggerEditor : Editor
9+
{
10+
private SerializedProperty m_DelegatesProperty;
11+
12+
private GUIContent m_IconToolbarMinus;
13+
14+
private GUIContent m_EventIDName;
15+
16+
private GUIContent[] m_EventTypes;
17+
18+
private GUIContent m_AddButonContent;
19+
20+
protected virtual void OnEnable()
21+
{
22+
this.m_DelegatesProperty = base.serializedObject.FindProperty("m_Delegates");
23+
this.m_AddButonContent = new GUIContent("Add New Event Type");
24+
this.m_EventIDName = new GUIContent("");
25+
this.m_IconToolbarMinus = new GUIContent(EditorGUIUtility.IconContent("Toolbar Minus"));
26+
this.m_IconToolbarMinus.tooltip = "Remove all events in this list.";
27+
string[] names = Enum.GetNames(typeof(EventTriggerType));
28+
this.m_EventTypes = new GUIContent[names.Length];
29+
for (int i = 0; i < names.Length; i++)
30+
{
31+
this.m_EventTypes[i] = new GUIContent(names[i]);
32+
}
33+
}
34+
35+
public override void OnInspectorGUI()
36+
{
37+
base.serializedObject.Update();
38+
int num = -1;
39+
EditorGUILayout.Space();
40+
Vector2 vector = GUIStyle.none.CalcSize(this.m_IconToolbarMinus);
41+
for (int i = 0; i < this.m_DelegatesProperty.arraySize; i++)
42+
{
43+
SerializedProperty arrayElementAtIndex = this.m_DelegatesProperty.GetArrayElementAtIndex(i);
44+
SerializedProperty serializedProperty = arrayElementAtIndex.FindPropertyRelative("eventID");
45+
SerializedProperty property = arrayElementAtIndex.FindPropertyRelative("callback");
46+
this.m_EventIDName.text = serializedProperty.enumDisplayNames[serializedProperty.enumValueIndex];
47+
EditorGUILayout.PropertyField(property, this.m_EventIDName, new GUILayoutOption[0]);
48+
Rect lastRect = GUILayoutUtility.GetLastRect();
49+
Rect position = new Rect(lastRect.xMax - vector.x - 8f, lastRect.y + 1f, vector.x, vector.y);
50+
if (GUI.Button(position, this.m_IconToolbarMinus, GUIStyle.none))
51+
{
52+
num = i;
53+
}
54+
EditorGUILayout.Space();
55+
}
56+
if (num > -1)
57+
{
58+
this.RemoveEntry(num);
59+
}
60+
Rect rect = GUILayoutUtility.GetRect(this.m_AddButonContent, GUI.skin.button);
61+
rect.x += (rect.width - 200f) / 2f;
62+
rect.width = 200f;
63+
if (GUI.Button(rect, this.m_AddButonContent))
64+
{
65+
this.ShowAddTriggermenu();
66+
}
67+
base.serializedObject.ApplyModifiedProperties();
68+
}
69+
70+
private void RemoveEntry(int toBeRemovedEntry)
71+
{
72+
this.m_DelegatesProperty.DeleteArrayElementAtIndex(toBeRemovedEntry);
73+
}
74+
75+
private void ShowAddTriggermenu()
76+
{
77+
GenericMenu genericMenu = new GenericMenu();
78+
for (int i = 0; i < this.m_EventTypes.Length; i++)
79+
{
80+
bool flag = true;
81+
for (int j = 0; j < this.m_DelegatesProperty.arraySize; j++)
82+
{
83+
SerializedProperty arrayElementAtIndex = this.m_DelegatesProperty.GetArrayElementAtIndex(j);
84+
SerializedProperty serializedProperty = arrayElementAtIndex.FindPropertyRelative("eventID");
85+
if (serializedProperty.enumValueIndex == i)
86+
{
87+
flag = false;
88+
}
89+
}
90+
if (flag)
91+
{
92+
genericMenu.AddItem(this.m_EventTypes[i], false, new GenericMenu.MenuFunction2(this.OnAddNewSelected), i);
93+
}
94+
else
95+
{
96+
genericMenu.AddDisabledItem(this.m_EventTypes[i]);
97+
}
98+
}
99+
genericMenu.ShowAsContext();
100+
Event.current.Use();
101+
}
102+
103+
private void OnAddNewSelected(object index)
104+
{
105+
int enumValueIndex = (int)index;
106+
this.m_DelegatesProperty.arraySize++;
107+
SerializedProperty arrayElementAtIndex = this.m_DelegatesProperty.GetArrayElementAtIndex(this.m_DelegatesProperty.arraySize - 1);
108+
SerializedProperty serializedProperty = arrayElementAtIndex.FindPropertyRelative("eventID");
109+
serializedProperty.enumValueIndex = enumValueIndex;
110+
base.serializedObject.ApplyModifiedProperties();
111+
}
112+
}
113+
}

0 commit comments

Comments
 (0)