Manual/UIB-structuring-ui-custom-elements #550
Replies: 1 comment
-
|
As of 2023.2.0a9 this example can become: using UnityEngine;
using UnityEngine.UIElements;
[UxmlElement]
partial class MyElement : VisualElement
{
[UxmlAttribute]
public string myString { get; set; } = "default_value";
[UxmlAttribute]
public int myInt { get; set; } = 2;
// The codegen requires a public default constructor.
// ReSharper disable once MemberCanBePrivate.Global
public MyElement() { }
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Manual/UIB-structuring-ui-custom-elements
https://docs.unity3d.com/Manual/UIB-structuring-ui-custom-elements.html
Beta Was this translation helpful? Give feedback.
All reactions