mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[unity] ui-toolkit package: Code cleanup, added documentation. See #1943.
This commit is contained in:
parent
f3b3cb429a
commit
d982710070
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 38ed300e2ddd57841ab636ca4a49fc18
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,9 @@
|
||||
## Spine UI Toolkit Extension [Experimental]
|
||||
|
||||
This experimental plugin provides integration of UI Toolkit for the spine-unity runtime. Please be sure to test this package first and create backups of your project before using.
|
||||
The plugin adds a `SpineVisualElement` control element to be used with UI Toolkit, providing functionality similar to `SkeletonGraphic` to add your Spine skeletons to a Visual Tree Asset via UI Toolkit's UI Builder.
|
||||
|
||||
### Usage
|
||||
|
||||
For usage of the `SpineVisualElement` control element, you can check out the included `UI Toolkit Example.unity` example scene and `SpineUIToolkit.uxml` file which can be installed via the `Samples` tab in the Unity Package Manager window.
|
||||
The new `SpineVisualElement` can be found in the Unity `UI Builder` window under `Library - Project - Custom Controls` `Spine - Unity - SpineVisualElement`. It can be added to your hierarchy and configured as normal UI Toolkit elements while providing Spine skeleton attributes as well.
|
||||
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e57aa0442e306ce44b13d22c2c749753
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -39,7 +39,6 @@ namespace Spine.Unity {
|
||||
|
||||
[UxmlElement]
|
||||
public partial class SpineVisualElement : VisualElement {
|
||||
public new class UxmlFactory : UxmlFactory<SpineVisualElement, UxmlTraits> { }
|
||||
|
||||
[SpineAnimation(dataField: "SkeletonDataAsset", avoidGenericMenu: true)]
|
||||
[UxmlAttribute]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user