You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+68-12Lines changed: 68 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,20 +71,76 @@ To start using Figma Inspector, a Figma Personal Access Token is needed for API
71
71
4. Locate the Figma script in Unity's Inspector.
72
72
5. Paste the token into the designated field.
73
73
74
-
## Figma class (TODO)
75
-
## Element class (OnInitialize, OnRebuild, Custom Elements) (TODO)
74
+
## Figma class (TOBEREVIEWED)
75
+
During the update process the Figma class retrieves data based on the Uxml and Query attributes of the Element scripts. It then utilizes this data while producing UXML asset.
76
+
> [!WARNING]
77
+
> Element scripts should be attached to the same game object to which the Figma script is also attached.
78
+
79
+
## Element class (OnInitialize, OnRebuild, Custom Elements) (TOBEREVIEWED)
80
+
The Uxml and Query attributes define the structure of the Uxml asset and, consequently, the appearance of your UI.
81
+
The type of the field following the Query attribute defines the UI element itself and, consequently, its behavior (VisualElement, Button, Label, etc.). Field types are written into UXML. Therefore, if you change the field type (for example, from VisualElement to Button), you will need to perform a Figma Update to regenerate the UXML.
82
+
Each element can override OnInitialize and OnRebuild methods which can be used to do any initial setup operations.
@@ -159,7 +215,7 @@ This interface serves as an identifier, signifying that within the IRootElement
159
215
## IRootElement
160
216
This interface acts as a marker, indicating that an element within the IRootElement hierarchy is capable of functioning as a component derived from the VisualElement class.
161
217
162
-
## Visual Element Style (TOBEREVIEWED)
218
+
## Visual Element Style
163
219
The imported USS file contains all the classes used by Visual Elements. USS is inspired by CSS and has a similar syntax. To manipulate properties in your code, you should use the techniques described below.
164
220
### Changing Element Appearance
165
221
To change the appearance of a VisualElement, you should manipulate its style properties. For example, to set the top margin of an element to 3:
0 commit comments