simonoliver / unityfigmabridge Goto Github PK
View Code? Open in Web Editor NEWEasily bring your Figma Documents, Components, Assets and Prototypes to Unity
License: MIT License
Easily bring your Figma Documents, Components, Assets and Prototypes to Unity
License: MIT License
I am unable to close an issue which has been closed by someone else so I am referencing the issue here. Feel free to delete this thread an re-open the last one. Sorry for any inconvenience.
@kamunimaximus Curious about your use case here - right now I've assumed that all screens would be the same size (as you are designing for the same device). It looks like you want to have a modal popup appear on one of your screens. For this I'd recommend having this as a component that is placed on an existing screen, and simply made made visible in code. Let me know if you want an example for this.
Sorry for the late reply! The use case is for sure a modal, when setting a frame as overlay in figma you can specify overlay background and behaviour for the modal component. Right now the behaviour in figma and unity is vastly different
Let me know if this makes sense
Originally posted by @kamunimaximus in #4 (comment)
No matching font SF Pro Text
UnityEngine.Debug:LogWarning (object)
UnityFigmaBridge.Editor.Fonts.GoogleFontLibraryManager:GetFontUrl (string,int) (at ./Library/PackageCache/com.simonoliver.unityfigma@318d39d545/UnityFigmaBridge/Editor/Fonts/GoogleFontLibraryManager.cs:183)
UnityFigmaBridge.Editor.Fonts.GoogleFontLibraryManager:CheckFontAvailableForDownload (string,int) (at ./Library/PackageCache/com.simonoliver.unityfigma@318d39d545/UnityFigmaBridge/Editor/Fonts/GoogleFontLibraryManager.cs:220)
UnityFigmaBridge.Editor.Fonts.FontManager/d__0:MoveNext () (at ./Library/PackageCache/com.simonoliver.unityfigma@318d39d545/UnityFigmaBridge/Editor/Fonts/FontManager.cs:90)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<UnityFigmaBridge.Editor.Fonts.FigmaFontMap>:Start<UnityFigmaBridge.Editor.Fonts.FontManager/d__0> (UnityFigmaBridge.Editor.Fonts.FontManager/d__0&)
UnityFigmaBridge.Editor.Fonts.FontManager:GenerateFontMapForDocument (UnityFigmaBridge.Editor.FigmaApi.FigmaFile,bool)
UnityFigmaBridge.Editor.UnityFigmaBridgeImporter/d__17:MoveNext () (at ./Library/PackageCache/com.simonoliver.unityfigma@318d39d545/UnityFigmaBridge/Editor/UnityFigmaBridgeImporter.cs:424)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:SetResult ()
UnityFigmaBridge.Editor.FigmaApi.FigmaApiUtils/d__8:MoveNext () (at ./Library/PackageCache/com.simonoliver.unityfigma@318d39d545/UnityFigmaBridge/Editor/FigmaApi/FigmaApiUtils.cs:349)
System.Runtime.CompilerServices.AsyncMethodBuilderCore/MoveNextRunner:Run ()
UnityFigmaBridge.Editor.Utils.UnityWebRequestAwaiter:OnRequestCompleted (UnityEngine.AsyncOperation) (at ./Library/PackageCache/com.simonoliver.unityfigma@318d39d545/UnityFigmaBridge/Editor/Utils/UnityWebRequestAwaiter.cs:41)
UnityEngine.AsyncOperation:InvokeCompletionEvent ()
To Reproduce
Steps to reproduce the behavior:
using figma image url : https://www.figma.com/file/Vg26v9Wm9bx6R0DUEEDEvZ/Add-Unit-page?type=design&node-id=1-213&mode=design&t=Gwk8uJRXgc6vBOe4-0
Followed steps mentioned in video: https://www.youtube.com/watch?v=4LjvsMXwaI8
** Version**
Feature request:
Figma - Auto layout โก๏ธ Unity - Horizontal/Vertical Layout Group
Dear creators,
have you thought of including a svg importer?
This is currently unsupported but is readable through the relativeTransform property
Describe the bug
The Figma URL path itself was the problem!!! Figma changed from a path starting with file/ to a path starting with design/, which caused the problem.
https://www.figma.com/file/~~~
https://www.figma.com/design/~~~
To Reproduce
Currently, if you use the URL from Figma and enter it into the Document URL in the Setting, it will always fail.
Expected behavior
<Figma Document URL is not valid, please enter valid URL> window shown.
Screenshots and example Figma File
Version
Temparary Solution
Just Changing https://www.figma.com/design/ABCDEFGH~~
(current path) link to https://www.figma.com/file/ABCDEFGH~~
(old path). This problem can be solved.
Describe the bug
If Figma data contains a section layer, it cannot be imported into Unity properly.
Version
Expected behavior
Hi,
Thank you very much for publishing this wonderful project!
I would like a demo of a visual tree style UI.
Visual https://docs.unity3d.com/Manual/UIE-VisualTree.html
!
It would be very helpful if you could also show us how to add or remove elements.
Best regards,
Hi, thanks for the great assets @simonoliver, you have helped me a lot!
I do not know if it is a bug or a spec, but I found a strange behavior and I am reporting it.
Describe the bug
Please see attached images bellow.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screen's Prefab should be output even if the Export attribute is set on the Frame.
Or, it should be described in the document as a constraint.
Screenshots and example Figma File
https://www.figma.com/file/4k0vdnPH69ORek0F4zSUrX/Figma-Unity-Bridge-Example-(Community)?type=design&node-id=3%3A1776&mode=design&t=n1Xni1is4sMMlEh1-1
Version
Additional context
Add any other context about the problem here.
Thank you,
problem
each time i make SYNC command, the entire prefab library is being deleted, and reimported. this is not what "synchronization" means, and its confusing.
potential solution
i would prefer that only the things that have changed, actually will happen.
if an object is moved >> transform will change.
if an object is added or removed >> this will reflect.
if internal structure is changed or image change >> etc
**alternatives **
plugin FigmaImporter is the other "competitor".
you have the advantage since you are creating prefabs etc.
Additional context
1- the huge issue here, is that each time a designer makes a small change on Figma, i am risking to change the entire unity project.
2- code components that depend on the hierarchy are not feasible. i have to use component name to connect various items, etc.
Please add support for unity UI toolkit for runtime use
Originally posted by MargaritaChebotareva April 16, 2024
Hello! Thanks for your plugin!
In short, the problem is that in Unity 2023.2.3 the TMP library has been moved to com.unity.ugui and you can only get the essential resources for TMP version 2.0.1.
I tried changing the TMP version in dependencies in package.json of your plugin or changed "com.unity.textmeshpro": "2.0.1" to "com.unity.ugui": "2.0.0" but it didn't work.
In the end I have only version 2.0.1. In this case, using the plugin gives the following result:
I downloaded Unity 2021.3.19f and ran your project. In the old version of Unity everything works, it looks like this:
In the package manager, the TMP library is version 3.0.6, but as I said, I can't get it in the new version of Unity.
I tried to find a solution and found this thread:
https://forum.unity.com/threads/2023-2-latest-development-on-textmesh-pro.1434757/
Now, I'm thinking of taking the essential resources of TMP from your project and moving to 2023, but this is certainly not the best solution...
I think that if change the library that is used in the code (I don't understand why it doesn't throw a compiler error due to namespaces), the plugin will use ugui's new version of TMP, but maybe I'm confusing something.
Could you please help me?
Describe the bug
I get the following error when trying to Sync Document
Error downloading Figma document - Check your personal access key and document url are correct System.Exception: Problem decoding Figma document JSON Newtonsoft.Json.JsonSerializationException: Error converting value "TABLE" to type 'UnityFigmaBridge.Editor.FigmaApi.NodeType'. Path 'document.children[0].children[2].children[7].type', line 1, position 23813. ---> System.ArgumentException: Requested value 'TABLE' was not found. at Newtonsoft.Json.Utilities.EnumUtils.ParseEnum (System.Type enumType, Newtonsoft.Json.Serialization.NamingStrategy namingStrategy, System.String value, System.Boolean disallowNumber) [0x001e9] in /root/repo/Src/Newtonsoft.Json/Utilities/EnumUtils.cs:370 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType (Newtonsoft.Json.JsonReader reader, System.Object value, System.Globalization.CultureInfo culture, Newtonsoft.Json.Serialization.JsonContract contract, System.Type targetType) [0x00054] in /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:970
To Reproduce
Steps to reproduce the behavior:
** Version**
These need to be implemented
@simonoliver thanks so much for developing this!
Could you please tag your releases? I would very much appreciate it so I better track package updates ๐
Describe the bug
For example, if two different components on Figma (ButtonA and ButtonB) have the same name property name and value name "Type=State, Value=Enable" using the variant feature, they will be merged into "Type=State,Value=Enable.prefab", the data will be merged into the data and one of the buttons will not be displayed correctly.
Expected behavior
I would like each component to be imported as a unique prefab, even if the property and value names are the same.
Or, I would like Unity to tell me in the error message that it is due to duplicate property and value names.
Additional context
For now, this is handled by setting a unique value name for each component (e.g., "Name=ButtonA" & "Name=ButtonB")
Describe the bug
Error occurs during Document conversion when QUICK is used for Easing in Figma's Prototype Flow.
I added a QUICK definition and the conversion was successful.
But I am not sure if this is enough.
https://github.com/simonoliver/UnityFigmaBridge/blob/main/UnityFigmaBridge/Editor/FigmaApi/FigmaApiData.cs#L550
Version
Unity Version: 2022.2.1f1
Platform: MacOS 12.6
Rendering Pipeline: URP 14.0.4
After Click Sync document, I can not download data from my Figma document. Then, Unity popup text "Error downloading Figma Server Render Data".
Do you meet the popup and how do you deal it?
** Version**
Regardless of the size of the overlay they take up the entire screen
Describe the bug
When i try to import a figma project, unity gives me this error:
"A meta data file (.meta) exists but its asset 'Assets/Figma/Screens/TEST UNITY.prefab' can't be found. When moving or deleting files outside of Unity, please ensure that the corresponding .meta file is moved or deleted along with it.
UnityEditor.PrefabUtility:SaveAsPrefabAssetAndConnect (UnityEngine.GameObject,string,UnityEditor.InteractionMode)"
And i can't see anything in scene. Unity import Figma pages in asset folder.
I used Unity 2021.3.31f1, and i have not Figma Premium
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.