Skip to content

Commit 4134799

Browse files
author
Unity Technologies
committed
Unity 2017.4.9f1 C# reference source code
1 parent a34e44e commit 4134799

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

Editor/Mono/BuildPipeline/MonoAssemblyStripping.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,17 +267,15 @@ public static AssemblyDefinition ResolveAssemblyReference(IAssemblyResolver reso
267267
{
268268
return resolver.Resolve(assemblyName, new ReaderParameters { AssemblyResolver = resolver, ApplyWindowsRuntimeProjections = true });
269269
}
270-
catch (AssemblyResolutionException e)
270+
catch (AssemblyResolutionException)
271271
{
272272
// Skip module dlls if we can't find them - we might build for a platform without modular UnityEngine support.
273273
if (AssemblyHelper.IsUnityEngineModule(assemblyName.Name))
274274
return null;
275275

276276
// DefaultAssemblyResolver doesn't handle windows runtime references correctly. But that is okay, as they cannot derive from managed types anyway
277-
if (e.AssemblyReference.IsWindowsRuntime)
278-
return null;
279-
280-
throw;
277+
// Besides, if any assembly is missing, UnityLinker will stub it and we should not care about it
278+
return null;
281279
}
282280
}
283281

Editor/Mono/Inspector/ClothInspector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ void OnPreSceneGUI()
13381338
if (state.ToolMode == (ToolMode)(-1))
13391339
state.ToolMode = ToolMode.Select;
13401340

1341-
if (m_ParticleSelection == null)
1341+
if ((m_ParticleSelection == null) || (m_LastVertices.Length != cloth.vertices.Length))
13421342
{
13431343
GenerateSelectionMesh();
13441344
}

Editor/Mono/Inspector/EditorDragging.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,18 @@ void HandleEditorDragging(int editorIndex, Rect targetRect, float markerY, bool
203203
// Add script components
204204
var index = 0;
205205
var addedComponents = new Component[targetComponents.Length * scripts.Count()];
206-
foreach (var targetComponent in targetComponents)
206+
for (int i = 0; i < targetComponents.Length; i++)
207207
{
208+
var targetComponent = targetComponents[i];
208209
var gameObject = targetComponent.gameObject;
210+
bool targetIsTransform = targetComponent is Transform;
209211
foreach (var script in scripts)
210212
addedComponents[index++] = Undo.AddComponent(gameObject, script.GetClass());
213+
214+
// If the target is a Transform, the AddComponent might have replaced it with a RectTransform.
215+
// Handle this possibility by updating the target component.
216+
if (targetIsTransform)
217+
targetComponents[i] = gameObject.transform;
211218
}
212219

213220
// Move added components relative to target components

README.md

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