- Изменено
Check if state is valid
Hi,
how can I check if public Spine.AnimationState state;
is valid or not.
I cant null check, when it isn't valid it is equal to <none>
What does it mean for an AnimationState to be "valid"?
if it is none
and you access data you get a null reference. . so it is valid when it isn't
none
"<none>" is what you get from state.ToString()
if the tracks are empty.
https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-csharp/src/AnimationState.cs#L257
but how do I know if all the tracks are empty :*(
I guess you know which tracks you're using.
GetCurrent(i) returns null if track (i) is empty.
So you just GetCurrent(i)
for all the tracks and check for null on each.
I don't know which tracks im using :tmi: : :tmi: