mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
15 lines
1.3 KiB
Markdown
15 lines
1.3 KiB
Markdown
## 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.
|
|
|
|
### Limitations
|
|
|
|
Premultiply-alpha (PMA) atlas textures are not supported due to limitations of the UI Toolkit `VisualElement` API, not allowing custom shaders. Please export your atlas textures as straight alpha to avoid artifacts.
|
|
|
|
Custom slot blend modes (additive, muliply, screen) are not supported due to the same custom shader limitation. |