Skip to content
This repository was archived by the owner on Mar 25, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions UnityDecompiled.sln
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
VisualStudioVersion = 12.0.31101.0
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEngine", "UnityEngine\UnityEngine.csproj", "{45BFEA31-16C1-4F6A-AC9B-EFA7A5449446}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEngine", "UnityEngine\UnityEngine.csproj", "{87EA7A76-1542-4CAA-B07E-3DABE44E610B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEditor", "UnityEditor\UnityEditor.csproj", "{5905B295-D0F8-4B28-92B8-DF4FB546261A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEditor", "UnityEditor\UnityEditor.csproj", "{393C16E7-D08F-4507-BD5D-768479734462}"
ProjectSection(ProjectDependencies) = postProject
{45BFEA31-16C1-4F6A-AC9B-EFA7A5449446} = {45BFEA31-16C1-4F6A-AC9B-EFA7A5449446}
{87EA7A76-1542-4CAA-B07E-3DABE44E610B} = {87EA7A76-1542-4CAA-B07E-3DABE44E610B}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEditor.UI", "UnityEditor.UI\UnityEditor.UI.csproj", "{0202EE81-8DBB-4C49-9668-2AC7F15E1A1D}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEditor.UI", "UnityEditor.UI\UnityEditor.UI.csproj", "{04B72AAC-C806-40B8-AFF3-50C3F0355A11}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEngine.UI", "UnityEngine.UI\UnityEngine.UI.csproj", "{F7CDA827-F65F-486A-80A6-948FDDD88300}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityEngine.UI", "UnityEngine.UI\UnityEngine.UI.csproj", "{A2D84E72-888B-43DE-B8E8-42CE1813FC15}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0202EE81-8DBB-4C49-9668-2AC7F15E1A1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0202EE81-8DBB-4C49-9668-2AC7F15E1A1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0202EE81-8DBB-4C49-9668-2AC7F15E1A1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0202EE81-8DBB-4C49-9668-2AC7F15E1A1D}.Release|Any CPU.Build.0 = Release|Any CPU
{45BFEA31-16C1-4F6A-AC9B-EFA7A5449446}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{45BFEA31-16C1-4F6A-AC9B-EFA7A5449446}.Debug|Any CPU.Build.0 = Debug|Any CPU
{45BFEA31-16C1-4F6A-AC9B-EFA7A5449446}.Release|Any CPU.ActiveCfg = Release|Any CPU
{45BFEA31-16C1-4F6A-AC9B-EFA7A5449446}.Release|Any CPU.Build.0 = Release|Any CPU
{5905B295-D0F8-4B28-92B8-DF4FB546261A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5905B295-D0F8-4B28-92B8-DF4FB546261A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5905B295-D0F8-4B28-92B8-DF4FB546261A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5905B295-D0F8-4B28-92B8-DF4FB546261A}.Release|Any CPU.Build.0 = Release|Any CPU
{F7CDA827-F65F-486A-80A6-948FDDD88300}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F7CDA827-F65F-486A-80A6-948FDDD88300}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7CDA827-F65F-486A-80A6-948FDDD88300}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7CDA827-F65F-486A-80A6-948FDDD88300}.Release|Any CPU.Build.0 = Release|Any CPU
{87EA7A76-1542-4CAA-B07E-3DABE44E610B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{87EA7A76-1542-4CAA-B07E-3DABE44E610B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{87EA7A76-1542-4CAA-B07E-3DABE44E610B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{87EA7A76-1542-4CAA-B07E-3DABE44E610B}.Release|Any CPU.Build.0 = Release|Any CPU
{393C16E7-D08F-4507-BD5D-768479734462}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{393C16E7-D08F-4507-BD5D-768479734462}.Debug|Any CPU.Build.0 = Debug|Any CPU
{393C16E7-D08F-4507-BD5D-768479734462}.Release|Any CPU.ActiveCfg = Release|Any CPU
{393C16E7-D08F-4507-BD5D-768479734462}.Release|Any CPU.Build.0 = Release|Any CPU
{04B72AAC-C806-40B8-AFF3-50C3F0355A11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{04B72AAC-C806-40B8-AFF3-50C3F0355A11}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04B72AAC-C806-40B8-AFF3-50C3F0355A11}.Release|Any CPU.ActiveCfg = Release|Any CPU
{04B72AAC-C806-40B8-AFF3-50C3F0355A11}.Release|Any CPU.Build.0 = Release|Any CPU
{A2D84E72-888B-43DE-B8E8-42CE1813FC15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2D84E72-888B-43DE-B8E8-42CE1813FC15}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2D84E72-888B-43DE-B8E8-42CE1813FC15}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2D84E72-888B-43DE-B8E8-42CE1813FC15}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
4 changes: 2 additions & 2 deletions UnityEditor.UI/UnityEditor.UI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{0202EE81-8DBB-4C49-9668-2AC7F15E1A1D}</ProjectGuid>
<ProjectGuid>{04B72AAC-C806-40B8-AFF3-50C3F0355A11}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public override void OnInspectorGUI()
EditorGUILayout.PropertyField(this.m_Spacing, true, new GUILayoutOption[0]);
EditorGUILayout.PropertyField(this.m_ChildAlignment, true, new GUILayoutOption[0]);
Rect rect = EditorGUILayout.GetControlRect(new GUILayoutOption[0]);
rect = EditorGUI.PrefixLabel(rect, -1, new GUIContent("Child Control Size"));
rect = EditorGUI.PrefixLabel(rect, -1, new GUIContent("Control Child Size"));
rect.width = Mathf.Max(50f, (rect.width - 4f) / 3f);
EditorGUIUtility.labelWidth = 50f;
this.ToggleLeft(rect, this.m_ChildControlWidth, new GUIContent("Width"));
Expand Down
2 changes: 1 addition & 1 deletion UnityEditor/DesktopStandalonePostProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ protected virtual void SetupStagingArea()
string text4 = text2 + "/Metadata";
IL2CPPUtils.RunIl2Cpp(text, this.GetPlatformProvider(this.m_PostProcessArgs.target), delegate(string s)
{
}, this.m_PostProcessArgs.usedClassRegistry, this.Development);
}, this.m_PostProcessArgs.usedClassRegistry, false);
FileUtil.CreateOrCleanDirectory(text3);
IL2CPPUtils.CopyEmbeddedResourceFiles(text, text3);
FileUtil.CreateOrCleanDirectory(text4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public virtual void ShowImportSettings(Editor baseEditor, TextureImportPlatformS
}
bool flag2 = TextureImporter.IsETC1SupportedByBuildTarget(BuildPipeline.GetBuildTargetByName(platformSettings.name));
bool flag3 = textureImporterInspector.spriteImportMode != SpriteImportMode.None;
bool flag4 = platformSettings.textureCompression != TextureImporterCompression.Uncompressed || TextureImporter.IsTextureFormatETC1Compression((TextureFormat)num);
bool flag4 = TextureImporter.IsTextureFormatETC1Compression((TextureFormat)num);
if (flag2 && flag3 && flag4)
{
EditorGUI.BeginChangeCheck();
Expand Down
32 changes: 16 additions & 16 deletions UnityEditor/UnityEditor.Modules/ModuleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private static string CombinePaths(params string[] paths)

private static void LoadUnityExtensions()
{
foreach (PackageInfo current in ModuleManager.s_PackageManager.get_unityExtensions())
foreach (Unity.DataContract.PackageInfo current in ModuleManager.s_PackageManager.unityExtensions)
{
Console.WriteLine("Setting {0} v{1} for Unity v{2} to {3}", new object[]
{
Expand All @@ -193,8 +193,8 @@ private static void LoadUnityExtensions()
current.unityVersion,
current.basePath
});
foreach (KeyValuePair<string, PackageFileData> current2 in from f in current.get_files()
where f.Value.type == 3
foreach (KeyValuePair<string, PackageFileData> current2 in from f in current.files
where f.Value.type == PackageFileType.Dll
select f)
{
string text = Path.Combine(current.basePath, current2.Key).NormalizePath();
Expand Down Expand Up @@ -313,13 +313,13 @@ where a.GetName().Name == "Unity.Locator"
Console.WriteLine("Error scanning for packages. {0}", arg2);
return;
}
PackageInfo packageInfo;
Unity.DataContract.PackageInfo packageInfo;
try
{
packageInfo = (type.InvokeMember("GetPackageManager", BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod, null, null, new string[]
{
Application.unityVersion
}) as PackageInfo);
}) as Unity.DataContract.PackageInfo);
if (packageInfo == null)
{
Console.WriteLine("No package manager found!");
Expand All @@ -345,10 +345,10 @@ where a.GetName().Name == "Unity.Locator"
}
}

private static bool InitializePackageManager(PackageInfo package)
private static bool InitializePackageManager(Unity.DataContract.PackageInfo package)
{
string text = (from x in package.get_files()
where x.Value.type == 3
string text = (from x in package.files
where x.Value.type == PackageFileType.Dll
select x.Key).FirstOrDefault<string>();
bool result;
if (text == null || !File.Exists(Path.Combine(package.basePath, text)))
Expand All @@ -364,7 +364,7 @@ private static bool InitializePackageManager(PackageInfo package)
return result;
}

private static bool InitializePackageManager(Assembly assembly, PackageInfo package)
private static bool InitializePackageManager(Assembly assembly, Unity.DataContract.PackageInfo package)
{
ModuleManager.s_PackageManager = AssemblyHelper.FindImplementors<IPackageManagerModule>(assembly).FirstOrDefault<IPackageManagerModule>();
bool result;
Expand All @@ -381,16 +381,16 @@ private static bool InitializePackageManager(Assembly assembly, PackageInfo pack
}
else
{
package = new PackageInfo
package = new Unity.DataContract.PackageInfo
{
basePath = Path.GetDirectoryName(location)
};
}
ModuleManager.s_PackageManager.set_moduleInfo(package);
ModuleManager.s_PackageManager.set_editorInstallPath(EditorApplication.applicationContentsPath);
ModuleManager.s_PackageManager.set_unityVersion(new PackageVersion(Application.unityVersion));
ModuleManager.s_PackageManager.moduleInfo = package;
ModuleManager.s_PackageManager.editorInstallPath = EditorApplication.applicationContentsPath;
ModuleManager.s_PackageManager.unityVersion = new PackageVersion(Application.unityVersion);
ModuleManager.s_PackageManager.Initialize();
foreach (PackageInfo current in ModuleManager.s_PackageManager.get_playbackEngines())
foreach (Unity.DataContract.PackageInfo current in ModuleManager.s_PackageManager.playbackEngines)
{
BuildTarget buildTarget = BuildTarget.StandaloneWindows;
if (ModuleManager.TryParseBuildTarget(current.name, out buildTarget))
Expand All @@ -402,8 +402,8 @@ private static bool InitializePackageManager(Assembly assembly, PackageInfo pack
current.unityVersion,
current.basePath
});
foreach (KeyValuePair<string, PackageFileData> current2 in from f in current.get_files()
where f.Value.type == 3
foreach (KeyValuePair<string, PackageFileData> current2 in from f in current.files
where f.Value.type == PackageFileType.Dll
select f)
{
string path = Path.Combine(current.basePath, current2.Key).NormalizePath();
Expand Down
12 changes: 6 additions & 6 deletions UnityEditor/UnityEditor.Scripting.Compilers/CSharpLanguage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ private class NamespaceVisitor : AbstractAstVisitor
public override object VisitNamespaceDeclaration(NamespaceDeclaration namespaceDeclaration, object data)
{
CSharpLanguage.VisitorData visitorData = (CSharpLanguage.VisitorData)data;
visitorData.CurrentNamespaces.Push(namespaceDeclaration.get_Name());
visitorData.CurrentNamespaces.Push(namespaceDeclaration.Name);
namespaceDeclaration.AcceptChildren(this, visitorData);
visitorData.CurrentNamespaces.Pop();
return null;
Expand All @@ -38,7 +38,7 @@ public override object VisitNamespaceDeclaration(NamespaceDeclaration namespaceD
public override object VisitTypeDeclaration(TypeDeclaration typeDeclaration, object data)
{
CSharpLanguage.VisitorData visitorData = (CSharpLanguage.VisitorData)data;
if (typeDeclaration.get_Name() == visitorData.TargetClassName)
if (typeDeclaration.Name == visitorData.TargetClassName)
{
string text = string.Empty;
foreach (string current in visitorData.CurrentNamespaces)
Expand Down Expand Up @@ -104,18 +104,18 @@ public override string GetNamespace(string fileName, string definedSymbols)
}, StringSplitOptions.RemoveEmptyEntries));
foreach (string current in hashSet)
{
parser.get_Lexer().get_ConditionalCompilationSymbols().Add(current, string.Empty);
parser.Lexer.ConditionalCompilationSymbols.Add(current, string.Empty);
}
parser.get_Lexer().set_EvaluateConditionalCompilation(true);
parser.Lexer.EvaluateConditionalCompilation = true;
parser.Parse();
try
{
CSharpLanguage.NamespaceVisitor namespaceVisitor = new CSharpLanguage.NamespaceVisitor();
CSharpLanguage.NamespaceVisitor visitor = new CSharpLanguage.NamespaceVisitor();
CSharpLanguage.VisitorData visitorData = new CSharpLanguage.VisitorData
{
TargetClassName = Path.GetFileNameWithoutExtension(fileName)
};
parser.get_CompilationUnit().AcceptVisitor(namespaceVisitor, visitorData);
parser.CompilationUnit.AcceptVisitor(visitor, visitorData);
result = ((!string.IsNullOrEmpty(visitorData.DiscoveredNamespace)) ? visitorData.DiscoveredNamespace : string.Empty);
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ namespace UnityEditor.Scripting.Compilers
{
internal class MicrosoftCSharpCompiler : ScriptCompilerBase
{
private static string[] _uwpReferences;

internal static string WindowsDirectory
{
get
Expand Down Expand Up @@ -278,6 +276,11 @@ private void FillNETCoreCompilerOptions(WSASDK wsaSDK, List<string> arguments, r
}
}

private static void ThrowCompilerNotFoundException(string path)
{
throw new Exception(string.Format("'{0}' not found. Is your Unity installation corrupted?", path));
}

private Program StartCompilerImpl(List<string> arguments, string argsPrefix, bool msBuildCompiler)
{
string[] references = this._island._references;
Expand All @@ -296,24 +299,41 @@ private Program StartCompilerImpl(List<string> arguments, string argsPrefix, boo
string fileName2 = files[j];
arguments.Add(ScriptCompilerBase.PrepareFileName(fileName2).Replace('/', '\\'));
}
string text;
if (msBuildCompiler)
string text = Paths.Combine(new string[]
{
text = Path.Combine(MicrosoftCSharpCompiler.ProgramFilesDirectory, "MSBuild\\14.0\\Bin\\csc.exe");
}
else
EditorApplication.applicationContentsPath,
"Tools",
"Roslyn",
"CoreRun.exe"
}).Replace('/', '\\');
string text2 = Paths.Combine(new string[]
{
text = Path.Combine(MicrosoftCSharpCompiler.WindowsDirectory, "Microsoft.NET\\Framework\\v4.0.30319\\Csc.exe");
}
EditorApplication.applicationContentsPath,
"Tools",
"Roslyn",
"csc.exe"
}).Replace('/', '\\');
if (!File.Exists(text))
{
throw new Exception("'" + text + "' not found, either .NET 4.5 is not installed or your OS is not Windows 8/8.1.");
MicrosoftCSharpCompiler.ThrowCompilerNotFoundException(text);
}
if (!File.Exists(text2))
{
MicrosoftCSharpCompiler.ThrowCompilerNotFoundException(text2);
}
base.AddCustomResponseFileIfPresent(arguments, "csc.rsp");
string str = CommandLineFormatter.GenerateResponseFile(arguments);
string text3 = CommandLineFormatter.GenerateResponseFile(arguments);
ProcessStartInfo si = new ProcessStartInfo
{
Arguments = argsPrefix + "@" + str,
Arguments = string.Concat(new string[]
{
"\"",
text2,
"\" ",
argsPrefix,
"@",
text3
}),
FileName = text,
CreateNoWindow = true
};
Expand Down Expand Up @@ -402,14 +422,9 @@ internal static string[] GetAdditionalReferences(WSASDK wsaSDK)
{
result = null;
}
else if (MicrosoftCSharpCompiler._uwpReferences != null)
{
result = MicrosoftCSharpCompiler._uwpReferences;
}
else
{
MicrosoftCSharpCompiler._uwpReferences = UWPReferences.GetReferences();
result = MicrosoftCSharpCompiler._uwpReferences;
result = UWPReferences.GetReferences(UWPReferences.GetDesiredSDKVersion());
}
return result;
}
Expand All @@ -420,7 +435,19 @@ internal static string GetPlatformAssemblyPath(WSASDK wsaSDK)
string result;
if (wsaSDK == WSASDK.UWP)
{
result = Path.Combine(windowsKitDirectory, "UnionMetadata\\Facade\\Windows.winmd");
string text = Paths.Combine(new string[]
{
windowsKitDirectory,
"UnionMetadata",
UWPReferences.SdkVersionToString(UWPReferences.GetDesiredSDKVersion()),
"Facade",
"Windows.winmd"
});
if (!File.Exists(text))
{
text = Path.Combine(windowsKitDirectory, "UnionMetadata\\Facade\\Windows.winmd");
}
result = text;
}
else
{
Expand Down
Loading