mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
[unity] ISkeletonDataAssetComponent
This commit is contained in:
parent
21d56f4b98
commit
ad8964380e
@ -37,10 +37,16 @@ namespace Spine.Unity {
|
||||
event UpdateBonesDelegate UpdateWorld;
|
||||
event UpdateBonesDelegate UpdateComplete;
|
||||
|
||||
void LateUpdate ();
|
||||
//void LateUpdate ();
|
||||
Skeleton Skeleton { get; }
|
||||
}
|
||||
|
||||
/// <summary>Holds a reference to a SkeletonDataAsset.</summary>
|
||||
public interface ISkeletonDataAssetComponent {
|
||||
/// <summary>Gets the SkeletonDataAsset of the Spine Component.</summary>
|
||||
SkeletonDataAsset SkeletonDataAsset { get; }
|
||||
}
|
||||
|
||||
/// <summary>A Spine-Unity Component that manages a Spine.Skeleton instance, instantiated from a SkeletonDataAsset.</summary>
|
||||
public interface ISkeletonComponent {
|
||||
/// <summary>Gets the SkeletonDataAsset of the Spine Component.</summary>
|
||||
|
||||
@ -35,7 +35,7 @@ using Spine;
|
||||
namespace Spine.Unity {
|
||||
[ExecuteInEditMode, RequireComponent(typeof(CanvasRenderer), typeof(RectTransform)), DisallowMultipleComponent]
|
||||
[AddComponentMenu("Spine/SkeletonGraphic (Unity UI Canvas)")]
|
||||
public class SkeletonGraphic : MaskableGraphic, ISkeletonComponent, IAnimationStateComponent, ISkeletonAnimation {
|
||||
public class SkeletonGraphic : MaskableGraphic, ISkeletonComponent, IAnimationStateComponent, ISkeletonAnimation, ISkeletonDataAssetComponent {
|
||||
|
||||
#region Inspector
|
||||
public SkeletonDataAsset skeletonDataAsset;
|
||||
|
||||
@ -38,7 +38,7 @@ namespace Spine.Unity {
|
||||
/// <summary>Renders a skeleton.</summary>
|
||||
[ExecuteInEditMode, RequireComponent(typeof(MeshFilter), typeof(MeshRenderer)), DisallowMultipleComponent]
|
||||
[HelpURL("http://esotericsoftware.com/spine-unity-documentation#Rendering")]
|
||||
public class SkeletonRenderer : MonoBehaviour, ISkeletonComponent {
|
||||
public class SkeletonRenderer : MonoBehaviour, ISkeletonComponent, ISkeletonDataAssetComponent {
|
||||
|
||||
public delegate void SkeletonRendererDelegate (SkeletonRenderer skeletonRenderer);
|
||||
public event SkeletonRendererDelegate OnRebuild;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user