Skip to content

Commit 605c216

Browse files
Fixed debug panel visible during loading
1 parent 8f12c22 commit 605c216

4 files changed

Lines changed: 4 additions & 7 deletions

File tree

Explorer/Assets/DCL/Infrastructure/Global/Dynamic/Bootstraper.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ public async UniTask PreInitializeSetupAsync(UIDocument cursorRoot,
9494
string realm = await realmUrls.StartingRealmAsync(token);
9595
startingRealm = URLDomain.FromString(realm);
9696

97-
// Hides the debug UI during the initial flow
98-
debugUiRoot.rootVisualElement.EnsureNotNull().style.display = DisplayStyle.None;
99-
10097
// Initialize .NET logging ASAP since it might be used by another systems
10198
// Otherwise we might get exceptions in different platforms
10299
DotNetLoggingPlugin.Initialize();

Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Builders/DebugContainerBuilder.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,11 @@ public void BuildWithFlex(UIDocument debugRootCanvas)
8888

8989
isBuilt = true;
9090

91-
debugRootCanvas.rootVisualElement!.style!.display = DisplayStyle.Flex;
92-
9391
// Sort by name
9492
widgetBuilders.Sort(this);
9593

9694
container = debugRootCanvas.rootVisualElement!.Q<DebugContainer>();
95+
container.style.display = DisplayStyle.Flex;
9796
Container.Initialize();
9897

9998
debugRootCanvas.rootVisualElement!.Add(Container);

Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Views/Assets/DebugContainer.uxml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="False">
22
<Style src="project://database/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Views/Assets/DebugUtilitiesStyle.uss?fileID=7433441132597879392&amp;guid=70ae98e6ae8672b459c006796556f879&amp;type=3#DebugUtilitiesStyle" />
33
<DCL.DebugUtilities.Views.DebugContainer picking-mode="Ignore" style="justify-content: flex-start; align-self: auto; align-items: flex-end; flex-direction: column-reverse; flex-shrink: 1; flex-grow: 0; visibility: visible; overflow: visible; transform-origin: center; flex-wrap: nowrap; position: relative; height: 100%; margin-left: 8px; margin-right: 8px; margin-top: 8px; margin-bottom: 8px;">
4-
<ui:Button text="&#10;" display-tooltip-when-elided="true" name="OpenPanelButton" style="background-image: none; background-color: rgba(0, 0, 0, 0.8); -unity-background-scale-mode: stretch-to-fill; border-top-left-radius: 10px; border-bottom-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-left-color: rgba(0, 0, 0, 0); border-right-color: rgba(0, 0, 0, 0); border-top-color: rgba(0, 0, 0, 0); border-bottom-color: rgba(0, 0, 0, 0); width: 36px; height: 36px;">
4+
<ui:Button text="&#10;" display-tooltip-when-elided="true" name="OpenPanelButton" style="background-image: none; background-color: rgba(0, 0, 0, 0.8); -unity-background-scale-mode: stretch-to-fill; border-top-left-radius: 10px; border-bottom-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-left-color: rgba(0, 0, 0, 0); border-right-color: rgba(0, 0, 0, 0); border-top-color: rgba(0, 0, 0, 0); border-bottom-color: rgba(0, 0, 0, 0); width: 36px; height: 36px; display: none;">
55
<ui:VisualElement style="flex-grow: 1; background-color: rgba(0, 0, 0, 0); background-image: url(&quot;project://database/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Views/Assets/DebugIcn.png?fileID=21300000&amp;guid=55a1e120b19b29a4ab21d519c77fadd3&amp;type=3#DebugIcn&quot;); width: auto; margin-top: 1.5px; margin-bottom: 1.5px; margin-left: 1.5px; margin-right: 1.5px;" />
66
</ui:Button>
7-
<ui:VisualElement name="Panel" style="flex-grow: 0; flex-direction: column; border-top-left-radius: 10px; border-bottom-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; margin-bottom: 6px; background-color: rgba(0, 0, 0, 0.9);">
7+
<ui:VisualElement name="Panel" style="flex-grow: 0; flex-direction: column; border-top-left-radius: 10px; border-bottom-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; margin-bottom: 6px; background-color: rgba(0, 0, 0, 0.9); display: none;">
88
<ui:VisualElement name="Header" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); font-size: 12px; flex-direction: row; flex-shrink: 0;">
99
<ui:Label tabindex="-1" text="DEBUG PANEL" display-tooltip-when-elided="true" class="debug-text--header" style="flex-grow: 1; border-left-width: 10px; -unity-text-align: middle-left;" />
1010
<ui:Button text="✖" display-tooltip-when-elided="true" name="CloseButton" style="margin-left: 2px; margin-right: 2px; margin-top: 2px; margin-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; padding-bottom: 2px; -unity-font-style: normal; border-left-width: 0; border-right-width: 6px; border-top-width: 0; border-bottom-width: 0; background-color: rgba(188, 188, 188, 0); align-self: center; border-left-color: rgba(149, 149, 149, 0); border-right-color: rgba(149, 149, 149, 0); border-top-color: rgba(149, 149, 149, 0); border-bottom-color: rgba(149, 149, 149, 0);" />

Explorer/Assets/DCL/PerformanceAndDiagnostics/DebugUtilities/Views/DebugContainer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class DebugContainer : VisualElement
1313
internal void Initialize()
1414
{
1515
Button toolButton = this.Q<Button>("OpenPanelButton");
16+
toolButton.style.display = DisplayStyle.Flex;
1617
VisualElement panel = this.Q("Panel");
1718

1819
Button closeButton = this.Q<Button>("CloseButton");

0 commit comments

Comments
 (0)