[Unity] Shortened new [SpineEvent] property drawer attribute.

This commit is contained in:
pharan 2015-12-31 09:36:54 +08:00
parent 4a7d3ecf96
commit fb9f53ee23
2 changed files with 5 additions and 5 deletions

View File

@ -159,9 +159,9 @@ public class SpineAnimationDrawer : SpineTreeItemDrawerBase<SpineAnimation> {
} }
[CustomPropertyDrawer(typeof(SpineEventData))] [CustomPropertyDrawer(typeof(SpineEvent))]
public class SpineEventDataDrawer : SpineTreeItemDrawerBase<SpineEventData> { public class SpineEventNameDrawer : SpineTreeItemDrawerBase<SpineEvent> {
protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineEventData targetAttribute, SkeletonData data) { protected override void PopulateMenu (GenericMenu menu, SerializedProperty property, SpineEvent targetAttribute, SkeletonData data) {
var events = skeletonDataAsset.GetSkeletonData(false).Events; var events = skeletonDataAsset.GetSkeletonData(false).Events;
for (int i = 0; i < events.Count; i++) { for (int i = 0; i < events.Count; i++) {
string name = events.Items[i].Name; string name = events.Items[i].Name;

View File

@ -31,7 +31,7 @@ public class SpineSlot : SpineAttributeBase {
} }
} }
public class SpineEventData : SpineAttributeBase { public class SpineEvent : SpineAttributeBase {
/// <summary> /// <summary>
/// Smart popup menu for Spine Events (Spine.EventData) /// Smart popup menu for Spine Events (Spine.EventData)
/// </summary> /// </summary>
@ -40,7 +40,7 @@ public class SpineEventData : SpineAttributeBase {
/// Valid types are SkeletonDataAsset and SkeletonRenderer (and derivatives). /// 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. /// If left empty and the script the attribute is applied to is derived from Component, GetComponent<SkeletonRenderer>() will be called as a fallback.
/// </param> /// </param>
public SpineEventData(string startsWith = "", string dataField = "") { public SpineEvent(string startsWith = "", string dataField = "") {
this.startsWith = startsWith; this.startsWith = startsWith;
this.dataField = dataField; this.dataField = dataField;
} }