Skip to content

Commit 7d9da8a

Browse files
author
Unity Technologies
committed
Unity 2019.3.0b12 C# reference source code
1 parent 6ce8f05 commit 7d9da8a

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

Editor/Mono/GUI/Toolbar.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ void InitializeToolIcons()
108108
static GUIContent s_CustomToolIcon;
109109
static GUIContent[] s_SnapToGridIcons;
110110
static int s_ViewToolOnOffset;
111+
internal static event Action<Rect> toolSettingsGui = delegate(Rect rect) {};
111112
private static GUIContent s_AccountContent;
112113
static GUIContent s_CloudIcon;
113114
static class Styles
@@ -238,6 +239,8 @@ protected override void OldOnGUI()
238239
ReserveWidthRight(standardButtonWidth, ref pos);
239240
DoSnapButtons(EditorToolGUI.GetThickArea(pos));
240241

242+
DoAdditionalSettingsCallback(EditorToolGUI.GetThickArea(pos));
243+
241244
// Position centered controls.
242245
pos = new Rect(playModeControlsStart, 0, 240, 0);
243246

@@ -402,7 +405,6 @@ void DoToolButtons(Rect rect)
402405

403406
void DoToolSettings(Rect rect)
404407
{
405-
rect = EditorToolGUI.GetThinArea(rect);
406408
EditorToolGUI.DoBuiltinToolSettings(rect, Styles.buttonLeft, Styles.buttonRight);
407409
}
408410

@@ -417,6 +419,14 @@ void DoSnapButtons(Rect rect)
417419
}
418420
}
419421

422+
void DoAdditionalSettingsCallback(Rect rect)
423+
{
424+
rect.x += rect.width + 8;
425+
float playButtonsStart = position.width / 2 - (Styles.commandLeft.fixedWidth + Styles.commandMid.fixedWidth + Styles.commandRight.fixedWidth) * .5f;
426+
rect.width = (playButtonsStart - rect.x) - 28;
427+
toolSettingsGui(rect);
428+
}
429+
420430
void DoPlayButtons(bool isOrWillEnterPlaymode)
421431
{
422432
// Enter / Exit Playmode

Editor/Mono/GUI/Tools/EditorToolContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,15 +577,15 @@ internal static void GetCustomEditorToolsForTarget(UnityObject target, List<Edit
577577

578578
foreach (var tool in instance.m_CustomEditorTools)
579579
{
580-
if (tool.target == target)
580+
if (tool.targets.Contains(target))
581581
list.Add(tool);
582582
}
583583

584584
if (searchLockedInspectors)
585585
{
586586
foreach (var tool in instance.m_LockedCustomEditorTools)
587587
{
588-
if (tool.target == target)
588+
if (tool.targets.Contains(target))
589589
list.Add(tool);
590590
}
591591
}

Editor/Mono/VersionControl/Common/VCAsset.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ internal static string AllStateToString(States state)
138138
if (IsState(state, States.ReadOnly))
139139
sb.Append("ReadOnly, ");
140140

141+
if (IsState(state, States.Unversioned))
142+
sb.Append("Unversioned, ");
143+
141144
// remove trailing ", " if had any
142145
if (sb.Length > 2)
143146
sb.Remove(sb.Length - 2, 2);

Editor/Mono/VersionControl/VCAsset.bindings.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public enum States
3939
ReadOnly = 16384,
4040
MetaFile = 32768,
4141
MovedLocal = 65536,
42-
MovedRemote = 131072
42+
MovedRemote = 131072,
43+
Unversioned = 262144
4344
}
4445

4546
public Asset(string clientPath)

README.md

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