Skip to content

Commit 9aad46e

Browse files
committed
Update documentation
Add samples
1 parent 4a65286 commit 9aad46e

18 files changed

+562
-150
lines changed

Editor/Inspector/FigmaInspector.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ IEnumerable<string> GetFontsDirs()
121121
if (!Path.GetFullPath(assetPath).StartsWith(Path.GetFullPath(Application.dataPath)))
122122
{
123123
string path = assetPath;
124-
PackageInfo packageInfo = packages.Find(x => Path.GetFullPath(path).StartsWith($"{Path.GetFullPath(x.resolvedPath)}\\"));
124+
PackageInfo packageInfo = packages.Find(x => Path.GetFullPath(path).StartsWith($"{Path.GetFullPath(x.resolvedPath)}"));
125125
assetPath = $"{packageInfo.assetPath}/{Path.GetFullPath(assetPath).Replace(Path.GetFullPath(packageInfo.resolvedPath), "")}";
126126
}
127127
}
@@ -148,8 +148,11 @@ IEnumerable<string> GetFontsDirs()
148148
if (GUILayout.Button(new GUIContent("Update UI", EditorGUIUtility.IconContent(documentsOnlyIcon).image), GUILayout.Height(20)) ||
149149
(downloadImages = GUILayout.Button(new GUIContent("Update UI & Images", EditorGUIUtility.IconContent(documentWithImagesIcon).image), GUILayout.Width(184), GUILayout.Height(20))) ||
150150
(forceUpdate = GUILayout.Button(new GUIContent(EditorGUIUtility.FindTexture(folderIcon)), GUILayout.Width(36))))
151+
{
151152
Update(forceUpdate ? default : AssetDatabase.GetAssetPath(visualTreeAsset),
152-
forceUpdate ? EditorUtility.DisplayDialog("Figma Updater", "Do you want to update images as well?", "Yes", "No") : downloadImages);
153+
forceUpdate ? EditorUtility.DisplayDialog("Figma Updater", "Do you want to update images as well?", "Yes", "No") : downloadImages);
154+
GUIUtility.ExitGUI();
155+
}
153156

154157
EditorGUILayout.EndHorizontal();
155158
EditorGUILayout.EndVertical();
@@ -496,6 +499,7 @@ void AddSvgImport(string id, string path)
496499
}
497500

498501
Progress.SetDescription(progress, "Importing svg...");
502+
#warning These paths are not absolute or relative
499503
foreach (SVGImporter importer in importSvg.Select(value => (SVGImporter)AssetImporter.GetAtPath(value.path)))
500504
{
501505
#if VECTOR_GRAPHICS_RASTER

Editor/Interface/Figma.Enums.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,6 @@ public enum NodeType
9191

9292
public enum ComponentPropertyType { BOOLEAN, TEXT, INSTANCE_SWAP, VARIANT }
9393

94-
public enum LayoutWrap { NO_WRAP }
94+
public enum LayoutWrap { NO_WRAP, WRAP }
9595
}
9696
}

Editor/Interface/Figma.Types.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,12 @@ public class DefaultFrameNode : DefaultShapeNode, DefaultFrameMixin
624624
public LayoutMode? layoutMode { get; set; }
625625
public PrimaryAxisSizingMode? primaryAxisSizingMode { get; set; }
626626
public CounterAxisSizingMode? counterAxisSizingMode { get; set; }
627+
public object primaryAxisSpacing { get; set; }
628+
public object counterAxisSpacing { get; set; }
627629
public PrimaryAxisAlignItems? primaryAxisAlignItems { get; set; }
628630
public CounterAxisAlignItems? counterAxisAlignItems { get; set; }
631+
public object primaryAxisAlignContent { get; set; }
632+
public object counterAxisAlignContent { get; set; }
629633
public number? paddingLeft { get; set; }
630634
public number? paddingTop { get; set; }
631635
public number? paddingRight { get; set; }

README.MD

Lines changed: 0 additions & 147 deletions
This file was deleted.

0 commit comments

Comments
 (0)