mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[Unity] Shortened new [SpineEvent] property drawer attribute.
This commit is contained in:
parent
4a7d3ecf96
commit
fb9f53ee23
@ -159,9 +159,9 @@ public class SpineAnimationDrawer : SpineTreeItemDrawerBase<SpineAnimation> {
|
||||
|
||||
}
|
||||
|
||||
[CustomPropertyDrawer(typeof(SpineEventData))]
|
||||
public class SpineEventDataDrawer : SpineTreeItemDrawerBase<SpineEventData> {
|
||||
protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineEventData targetAttribute, SkeletonData data) {
|
||||
[CustomPropertyDrawer(typeof(SpineEvent))]
|
||||
public class SpineEventNameDrawer : SpineTreeItemDrawerBase<SpineEvent> {
|
||||
protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineEvent targetAttribute, SkeletonData data) {
|
||||
var events = skeletonDataAsset.GetSkeletonData(false).Events;
|
||||
for (int i = 0; i < events.Count; i++) {
|
||||
string name = events.Items[i].Name;
|
||||
|
||||
@ -31,7 +31,7 @@ public class SpineSlot : SpineAttributeBase {
|
||||
}
|
||||
}
|
||||
|
||||
public class SpineEventData : SpineAttributeBase {
|
||||
public class SpineEvent : SpineAttributeBase {
|
||||
/// <summary>
|
||||
/// Smart popup menu for Spine Events (Spine.EventData)
|
||||
/// </summary>
|
||||
@ -40,7 +40,7 @@ public class SpineEventData : SpineAttributeBase {
|
||||
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives).
|
||||
/// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
|
||||
/// </param>
|
||||
public SpineEventData(string startsWith = "", string dataField = "") {
|
||||
public SpineEvent(string startsWith = "", string dataField = "") {
|
||||
this.startsWith = startsWith;
|
||||
this.dataField = dataField;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user