mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
Merge branch '3.8' into 4.0
This commit is contained in:
commit
ea991a6324
@ -202,7 +202,8 @@ namespace Spine.Unity {
|
|||||||
protected override void Awake () {
|
protected override void Awake () {
|
||||||
|
|
||||||
base.Awake ();
|
base.Awake ();
|
||||||
updateMode = updateWhenInvisible;
|
this.onCullStateChanged.AddListener(OnCullStateChanged);
|
||||||
|
|
||||||
SyncSubmeshGraphicsWithCanvasRenderers();
|
SyncSubmeshGraphicsWithCanvasRenderers();
|
||||||
if (!this.IsValid) {
|
if (!this.IsValid) {
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
@ -318,6 +319,13 @@ namespace Spine.Unity {
|
|||||||
UpdateMesh();
|
UpdateMesh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void OnCullStateChanged (bool culled) {
|
||||||
|
if (culled)
|
||||||
|
OnBecameInvisible();
|
||||||
|
else
|
||||||
|
OnBecameVisible();
|
||||||
|
}
|
||||||
|
|
||||||
public void OnBecameVisible () {
|
public void OnBecameVisible () {
|
||||||
updateMode = UpdateMode.FullUpdate;
|
updateMode = UpdateMode.FullUpdate;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user