mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Use Initialize instead of Update so animations aren't applied before the first Update.
This commit is contained in:
parent
ee1b835602
commit
41c36a89d3
@ -285,11 +285,11 @@ public class SkeletonComponent : MonoBehaviour {
|
||||
}
|
||||
|
||||
public virtual void OnEnable () {
|
||||
Update();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public virtual void Reset () {
|
||||
Update();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
|
||||
@ -52,7 +52,7 @@ public class SkeletonComponent : MonoBehaviour {
|
||||
private Material[] sharedMaterials = new Material[0];
|
||||
private List<Material> submeshMaterials = new List<Material>();
|
||||
private List<Submesh> submeshes = new List<Submesh>();
|
||||
|
||||
|
||||
/// <summary>False if Initialize needs to be called.</summary>
|
||||
public bool Initialized {
|
||||
get {
|
||||
@ -287,11 +287,11 @@ public class SkeletonComponent : MonoBehaviour {
|
||||
}
|
||||
|
||||
public virtual void OnEnable () {
|
||||
Update();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public virtual void Reset () {
|
||||
Update();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user