Giter Club home page Giter Club logo

unityfigmabridge's Introduction

Banner

Hello Image

I founded indie studio HandCircus and previously worked as Play Invention Director at LEGO. Check out some of the things I've worked on at Itch!

Best place to reach me is on ๐ŸคTwitter or ๐Ÿ˜Mastodon

unityfigmabridge's People

Contributors

laura-copop avatar naoya-maeda avatar nickyflello avatar satoruueda avatar simonoliver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

unityfigmabridge's Issues

Use device installed fonts for any fonts not available on Google Fonts.

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:

  1. using figma image url : https://www.figma.com/file/Vg26v9Wm9bx6R0DUEEDEvZ/Add-Unit-page?type=design&node-id=1-213&mode=design&t=Gwk8uJRXgc6vBOe4-0

  2. Followed steps mentioned in video: https://www.youtube.com/watch?v=4LjvsMXwaI8
    ** Version**

  • Unity Version: [Unity 2022.2.9f1]
  • Platform [Windows 10]

[BUG] Screen's Prefab is not output when Export attribute is set to the top level frame on Figma.

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:

  1. Add an Export attribute to the top level frame on Figma.
  2. Sync Document on Unity.
  3. Screen's Prefab is not output under Assets/Figma/Screens.

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
image
image
https://www.figma.com/file/4k0vdnPH69ORek0F4zSUrX/Figma-Unity-Bridge-Example-(Community)?type=design&node-id=3%3A1776&mode=design&t=n1Xni1is4sMMlEh1-1

Version

  • Unity Version: Unity 2022.3.8f1
  • Platform Windows 11
  • Rendering Pipeline Built-in render pipepline

Additional context
Add any other context about the problem here.

Thank you,

Great tool!

@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 ๐Ÿ™

Unity 2023, the TextMesh Pro package has been deprecated

Discussed in #41

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.
unity_2023_2_3f1_need_TMP

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:

unity_2023_2_3f1_result

I downloaded Unity 2021.3.19f and ran your project. In the old version of Unity everything works, it looks like this:

unity_2021_3_19f1_it_works

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?

If two components using variants with the same name property and value, they are merged into one prefab.

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")

[BUG] Error when entering DocumentURL in Setting because Figma URL is different

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.

  • original Figma path example : https://www.figma.com/file/~~~
  • new Figma path example : 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
image

Version

  • Unity Version: [e.g. Unity 2022.3.21]
  • Platform [e.g. Windows 11]
  • Rendering Pipeline [e.g Built-in render pipepline or URP 12.1.10]

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.

The error occurs when a section layer is included in the target file.

Describe the bug

If Figma data contains a section layer, it cannot be imported into Unity properly.

Version

  • Unity Version: 2022.2.1f1
  • Platform: MacOS 13.2.1
  • Rendering Pipeline: URP 14.0.4

Expected behavior

  • I want it to import correctly even if it contains section layers.
  • I want section layers to be ignored in Unity.
  • I would like to use the section layer itself for the purpose of organizing elements on Figma.

Problem decoding Figma document Error [BUG]

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:

  1. Set Document URL, and get 'Valid Figma Document URL'
  2. Set my PAT.
  3. Click 'Sync Document'
  4. See error

** Version**

  • Unity Version: Unity 2021.3.17
  • Platform Windows 10
  • Rendering Pipeline Built-in render pipepline

[BUG] Error downloading Figma Server Render Data

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**

  • Unity Version: Unity 2021.3.4f1
  • Platform Windows 10
  • Rendering Pipeline built- in renderer pipeline

Implement additional prototype interactions

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)

Nothing imported from Figma[BUG]

I have unity 2021.3.16f. It appears that everything is importing when selecting Sync Document. However, it just adds a blank canvas and EventSystem.

image

[BUG]

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.

Screenshot 2024-04-24 105159

I used Unity 2021.3.31f1, and i have not Figma Premium

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.