Thank you for your reply!
You are right, the ".Name" is just I missed.
For other users information, I write down my bad code example.
I tried like the following:
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using Spine.Unity;
public class CheckingTrack : MonoBehaviour
{
public Text AnimationNameField;
void Update()
{
var skeletonAnimation = GetComponent<SkeletonAnimation>();
var currentTrackEntry = skeletonAnimation.state.GetCurrent(0).Animation;
AnimationNameField.text = (currentTrackEntry);
}
}
Then, I got this error message:
Assets/CheckingTrack.cs(21,36): error CS0029: Cannot implicitly convert type 'Spine.Animation' to 'string'
What I should fix is this line:
AnimationNameField.text = (currentTrackEntry);
It should be like this:
AnimationNameField.text = (currentTrackEntry.Name);
It is working now, thank you so much!