Skip to content

Commit 397f725

Browse files
author
Unity Technologies
committed
Unity 2017.4.17f1 C# reference source code
1 parent 3e9cd89 commit 397f725

File tree

6 files changed

+36
-6
lines changed

6 files changed

+36
-6
lines changed

Editor/Mono/BuildPlayerWindow.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,8 @@ private static void GUIBuildButtons(IBuildWindowExtension buildWindowExtension,
858858

859859
GUIContent buildButton = styles.build;
860860
if (platform.targetGroup == BuildTargetGroup.Android
861-
&& EditorUserBuildSettings.exportAsGoogleAndroidProject)
861+
&& EditorUserBuildSettings.exportAsGoogleAndroidProject
862+
&& EditorUserBuildSettings.androidBuildSystem != AndroidBuildSystem.Internal)
862863
buildButton = styles.export;
863864

864865
// Build Button

Editor/Mono/BuildPlayerWindowBuildMethods.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,11 @@ static bool PickBuildLocation(BuildTargetGroup targetGroup, BuildTarget target,
308308
}
309309

310310

311-
// When exporting Eclipse project, we're saving a folder, not file,
311+
// When exporting Gradle or VS project, we're saving a folder, not file,
312312
// deal with it separately:
313313
if (target == BuildTarget.Android
314-
&& EditorUserBuildSettings.exportAsGoogleAndroidProject)
314+
&& EditorUserBuildSettings.exportAsGoogleAndroidProject
315+
&& EditorUserBuildSettings.androidBuildSystem != AndroidBuildSystem.Internal)
315316
{
316317
var exportProjectTitle = "Export Google Android Project";
317318
var exportProjectFolder = EditorUtility.SaveFolderPanel(exportProjectTitle, previousPath, "");
@@ -324,6 +325,10 @@ static bool PickBuildLocation(BuildTargetGroup targetGroup, BuildTarget target,
324325
}
325326

326327
string extension = PostprocessBuildPlayer.GetExtensionForBuildTarget(targetGroup, target, options);
328+
// Invalidate default name, if extension mismatches the default file (for ex., when switching between folder type export to file type export, see Android)
329+
if (extension != Path.GetExtension(defaultName).Replace(".", ""))
330+
defaultName = string.Empty;
331+
327332
string title = "Build " + BuildPlatforms.instance.GetBuildTargetDisplayName(targetGroup, target);
328333
string path = EditorUtility.SaveBuildPanel(target, title, defaultFolder, defaultName, extension, out updateExistingBuild);
329334

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Unity 2017.4.16f1 C# reference source code
1+
## Unity 2017.4.17f1 C# reference source code
22

33
The C# part of the Unity engine and editor source code.
44
May be used for reference purposes only.

Runtime/Export/iOS/iOSDevice.bindings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public enum DeviceGeneration
5454
iPhoneXS = 40,
5555
iPhoneXSMax = 41,
5656
iPhoneXR = 42,
57+
iPadPro11Inch = 43,
58+
iPadPro3Gen = 44,
5759

5860
iPhoneUnknown = 10001,
5961
iPadUnknown = 10002,

Runtime/IMGUI/Managed/GUISkin.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,19 @@ static internal void CleanupRoots()
195195
public GUISettings settings { get { return m_Settings; } }
196196

197197
internal static GUIStyle ms_Error;
198-
internal static GUIStyle error { get { if (ms_Error == null) ms_Error = new GUIStyle(); return ms_Error; } }
198+
199+
internal static GUIStyle error
200+
{
201+
get
202+
{
203+
if (ms_Error == null)
204+
{
205+
ms_Error = new GUIStyle();
206+
ms_Error.name = "StyleNotFoundError";
207+
}
208+
return ms_Error;
209+
}
210+
}
199211

200212
private Dictionary<string, GUIStyle> m_Styles = null;
201213

@@ -312,7 +324,7 @@ public GUIStyle GetStyle(string styleName)
312324
GUIStyle s = FindStyle(styleName);
313325
if (s != null)
314326
return s;
315-
Debug.LogWarning("Unable to find style '" + styleName + "' in skin '" + name + "' " + Event.current.type);
327+
Debug.LogWarning("Unable to find style '" + styleName + "' in skin '" + name + "' " + (Event.current != null ? Event.current.type.ToString() : "<called outside OnGUI>"));
316328
return error;
317329
}
318330

artifacts/generated/common/editor/EditorBuildSettingsBindings.gen.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,16 @@ public extern static bool exportAsGoogleAndroidProject
874874
set;
875875
}
876876

877+
public extern static bool buildAppBundle
878+
{
879+
[UnityEngine.Scripting.GeneratedByOldBindingsGeneratorAttribute] // Temporarily necessary for bindings migration
880+
[System.Runtime.CompilerServices.MethodImplAttribute((System.Runtime.CompilerServices.MethodImplOptions)0x1000)]
881+
get;
882+
[UnityEngine.Scripting.GeneratedByOldBindingsGeneratorAttribute] // Temporarily necessary for bindings migration
883+
[System.Runtime.CompilerServices.MethodImplAttribute((System.Runtime.CompilerServices.MethodImplOptions)0x1000)]
884+
set;
885+
}
886+
877887
public extern static bool symlinkLibraries
878888
{
879889
[UnityEngine.Scripting.GeneratedByOldBindingsGeneratorAttribute] // Temporarily necessary for bindings migration

0 commit comments

Comments
 (0)