Skip to content

Commit fe21f7f

Browse files
author
Unity Technologies
committed
Unity 2018.2.16f1 C# reference source code
1 parent c1cf0d8 commit fe21f7f

File tree

4 files changed

+23
-10
lines changed

4 files changed

+23
-10
lines changed

Editor/Mono/GameView/GameViewSizes.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,12 @@ private void InitBuiltinGroups()
198198
// iOS
199199
GameViewSize k_iPhone_750p_Portrait = new GameViewSize(GameViewSizeType.FixedResolution, 750, 1334, "iPhone 1334x750 Portrait");
200200
GameViewSize k_iPhone_750p_Landscape = new GameViewSize(GameViewSizeType.FixedResolution, 1334, 750, "iPhone 1334x750 Landscape");
201-
GameViewSize k_iPhone_X_Portrait = new GameViewSize(GameViewSizeType.FixedResolution, 1125, 2436, "iPhoneX 2436x1125 Portrait");
202-
GameViewSize k_iPhone_X_Landscape = new GameViewSize(GameViewSizeType.FixedResolution, 2436, 1125, "iPhoneX 2436x1125 Landscape");
201+
GameViewSize k_iPhone_X_Portrait = new GameViewSize(GameViewSizeType.FixedResolution, 1125, 2436, "iPhone X/XS 2436x1125 Portrait");
202+
GameViewSize k_iPhone_X_Landscape = new GameViewSize(GameViewSizeType.FixedResolution, 2436, 1125, "iPhone X/XS 2436x1125 Landscape");
203+
GameViewSize k_iPhone_828p_Portrait = new GameViewSize(GameViewSizeType.FixedResolution, 828, 1792, "iPhone XR 1792x828 Portrait");
204+
GameViewSize k_iPhone_828p_Landscape = new GameViewSize(GameViewSizeType.FixedResolution, 1792, 828, "iPhone XR 1792x828 Landscape");
205+
GameViewSize k_iPhone_1242p_Portrait = new GameViewSize(GameViewSizeType.FixedResolution, 1242, 2688, "iPhone XS Max 2688x1242 Portrait");
206+
GameViewSize k_iPhone_1242p_Landscape = new GameViewSize(GameViewSizeType.FixedResolution, 2688, 1242, "iPhone XS Max 2688x1242 Landscape");
203207

204208
GameViewSize k_iPad_1536p_Landscape = new GameViewSize(GameViewSizeType.FixedResolution, 2048, 1536, "iPad 2048x1536 Landscape");
205209
GameViewSize k_iPad_1536p_Portrait = new GameViewSize(GameViewSizeType.FixedResolution, 1536, 2048, "iPad 2048x1536 Portrait");
@@ -236,6 +240,8 @@ private void InitBuiltinGroups()
236240
k_iPhone_750p_Portrait, k_iPhone_750p_Landscape,
237241
k_1080p_Portrait, k_1080p_Landscape,
238242
k_iPhone_X_Portrait, k_iPhone_X_Landscape,
243+
k_iPhone_828p_Portrait, k_iPhone_828p_Landscape,
244+
k_iPhone_1242p_Portrait, k_iPhone_1242p_Landscape,
239245
k_iPad_1536p_Landscape, k_iPad_1536p_Portrait,
240246
k_iPad_2048p_Landscape, k_iPad_2048p_Portrait,
241247
k_iPad_1668p_Landscape, k_iPad_1668p_Portrait,

Editor/Mono/ImportSettings/ModelImporterMaterialEditor.cs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ internal class ModelImporterMaterialEditor : BaseAssetImporterTabUI
3030

3131
SerializedProperty m_SupportsEmbeddedMaterials;
3232

33-
SerializedProperty m_UseSRGBMaterialColor;
3433
private bool m_HasEmbeddedMaterials = false;
3534

3635
static class Styles
@@ -100,7 +99,6 @@ static class Styles
10099

101100
public static GUIContent RemapOptions = EditorGUIUtility.TrTextContent("On Demand Remap");
102101
public static GUIContent RemapMaterialsInProject = EditorGUIUtility.TrTextContent("Search and Remap", "Click on this button to search and remap the materials from the project.");
103-
public static GUIContent SRGBMaterialColor = EditorGUIUtility.TrTextContent("sRGB Albedo Colors", "Albedo colors in gamma space. Disable this for projects using linear color space.");
104102
}
105103

106104
public ModelImporterMaterialEditor(AssetImporterEditor panelContainer)
@@ -111,6 +109,7 @@ private void UpdateShowAllMaterialNameOptions()
111109
{
112110
// We need to display BasedOnTextureName_Or_ModelNameAndMaterialName obsolete option for objects which use this option
113111
#pragma warning disable 618
112+
m_MaterialName = serializedObject.FindProperty("m_MaterialName");
114113
m_ShowAllMaterialNameOptions = (m_MaterialName.intValue == (int)ModelImporterMaterialName.BasedOnTextureName_Or_ModelNameAndMaterialName);
115114
#pragma warning restore 618
116115
}
@@ -158,7 +157,18 @@ internal override void OnEnable()
158157

159158
m_SupportsEmbeddedMaterials = serializedObject.FindProperty("m_SupportsEmbeddedMaterials");
160159

161-
m_UseSRGBMaterialColor = serializedObject.FindProperty("m_UseSRGBMaterialColor");
160+
UpdateShowAllMaterialNameOptions();
161+
}
162+
163+
internal override void ResetValues()
164+
{
165+
base.ResetValues();
166+
UpdateShowAllMaterialNameOptions();
167+
}
168+
169+
internal override void PostApply()
170+
{
171+
UpdateShowAllMaterialNameOptions();
162172
}
163173

164174
public override void OnInspectorGUI()
@@ -356,16 +366,13 @@ void DoMaterialsGUI()
356366
{
357367
serializedObject.UpdateIfRequiredOrScript();
358368

359-
UpdateShowAllMaterialNameOptions();
360-
361369
EditorGUILayout.PropertyField(m_ImportMaterials, Styles.ImportMaterials);
362370

363371
string materialHelp = string.Empty;
364372
if (!m_ImportMaterials.hasMultipleDifferentValues)
365373
{
366374
if (m_ImportMaterials.boolValue)
367375
{
368-
EditorGUILayout.PropertyField(m_UseSRGBMaterialColor, Styles.SRGBMaterialColor);
369376
EditorGUILayout.Popup(m_MaterialLocation, Styles.MaterialLocationOpt, Styles.MaterialLocation);
370377
if (!m_MaterialLocation.hasMultipleDifferentValues)
371378
{

Modules/AI/NavMesh/NavMesh.bindings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace UnityEngine.AI
1010
public static partial class NavMesh
1111
{
1212
[StaticAccessor("GetNavMeshManager()")]
13-
[NativeName("Cleanup")]
13+
[NativeName("CleanupAfterCarving")]
1414
public static extern void RemoveAllNavMeshData();
1515
}
1616
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Unity 2018.2.15f1 C# reference source code
1+
## Unity 2018.2.16f1 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.

0 commit comments

Comments
 (0)