mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[unity] Fixed compile error on Unity 2019.1 and older of last commits related to pull request #2351, commit 01273670.
This commit is contained in:
parent
0515b398f4
commit
d652f560ce
@ -72,9 +72,11 @@ namespace Spine.Unity {
|
||||
if (Application.isPlaying) return;
|
||||
|
||||
if (skeletonWrapper == null) {
|
||||
if (TryGetComponent(out SkeletonAnimation skeletonAnimation))
|
||||
SkeletonAnimation skeletonAnimation;
|
||||
SkeletonGraphic skeletonGraphic;
|
||||
if (skeletonAnimation = this.GetComponent<SkeletonAnimation>())
|
||||
skeletonWrapper = new SkeletonAnimationWrapper(skeletonAnimation);
|
||||
else if (TryGetComponent(out SkeletonGraphic skeletonGraphic))
|
||||
else if (skeletonGraphic = this.GetComponent<SkeletonGraphic>())
|
||||
skeletonWrapper = new SkeletonGraphicWrapper(skeletonGraphic);
|
||||
}
|
||||
|
||||
@ -88,6 +90,7 @@ namespace Spine.Unity {
|
||||
|
||||
private void Update () {
|
||||
if (enabled == false || Application.isPlaying) return;
|
||||
if (skeletonWrapper == null) return;
|
||||
if (skeletonWrapper.State == null || skeletonWrapper.State.Tracks.Count == 0) return;
|
||||
|
||||
TrackEntry currentEntry = skeletonWrapper.State.Tracks.Items[0];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user