mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-10 17:18:44 +08:00
[unity] Fixed Update when invisible: mesh and mesh bounds were not always initialized when starting off-screen. Closes #1911.
This commit is contained in:
parent
2bc9dfebf4
commit
11077589c3
@ -356,7 +356,12 @@ namespace Spine.Unity {
|
||||
for (int i = 0; i < separatorSlotNames.Length; i++)
|
||||
separatorSlots.Add(skeleton.FindSlot(separatorSlotNames[i]));
|
||||
|
||||
LateUpdate(); // Generate mesh for the first frame it exists.
|
||||
// Generate mesh once, required to update mesh bounds for visibility
|
||||
UpdateMode updateModeSaved = updateMode;
|
||||
updateMode = UpdateMode.FullUpdate;
|
||||
skeleton.UpdateWorldTransform();
|
||||
LateUpdate();
|
||||
updateMode = updateModeSaved;
|
||||
|
||||
if (OnRebuild != null)
|
||||
OnRebuild(this);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user