Skip to content

Commit 205b2f2

Browse files
committed
Merge pull request 55242 from feature/mass-refactoring into master
1 parent b171a0a commit 205b2f2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Editor/FigmaParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,7 @@ void AddTextAlign()
14901490
unityTextAlign = $"{vertical}-{horizontal}";
14911491
}
14921492

1493-
if (style.fontSize.HasValue) this.fontSize = style.fontSize;
1493+
if (style.fontSize.HasValue) fontSize = style.fontSize;
14941494
if (style.fontPostScriptName.NullOrEmpty() && style.fontFamily == "Inter") style.fontPostScriptName = "Inter-Regular";
14951495
if (style.fontPostScriptName.NotNullOrEmpty()) AddUnityFont();
14961496
if (style.textAlignVertical.HasValue && style.textAlignHorizontal.HasValue) AddTextAlign();

Runtime/Extensions/NodeExtensions.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Collections;
32
using System.Collections.Generic;
43
using System.IO;
54
using System.Linq;
@@ -53,12 +52,12 @@ public static void Initialize(UIDocument document, IRootElement target)
5352
VisualElement targetRoot = document.rootVisualElement.Find(uxml.DocumentRoot, throwException: false, silent: false);
5453
if (targetRoot is null) return;
5554

56-
rootMetadata.Add(targetRoot, new(document, uxml, uxml.DocumentRoot));
55+
rootMetadata.Add(targetRoot, new Metadata(document, uxml, uxml.DocumentRoot));
5756

5857
(string path, VisualElement element)[] rootsPreserved = uxml.DocumentPreserve.Select(x => (x, document.rootVisualElement.Find(x, throwException: false, silent: false))).ToArray();
5958
foreach ((string path, VisualElement element) value in rootsPreserved)
6059
if (!rootMetadata.ContainsKey(value.element))
61-
rootMetadata.Add(value.element, new(document, uxml, value.path));
60+
rootMetadata.Add(value.element, new Metadata(document, uxml, value.path));
6261

6362
OnInitializeRoot?.Invoke(targetRoot, document, uxml);
6463
Initialize(target, targetType, targetRoot);

0 commit comments

Comments
 (0)