|
@@ -121,7 +121,6 @@ namespace Spine.Unity {
|
|
public bool updateSeparatorPartScale = false;
|
|
public bool updateSeparatorPartScale = false;
|
|
|
|
|
|
private bool wasUpdatedAfterInit = true;
|
|
private bool wasUpdatedAfterInit = true;
|
|
- private bool requiresInstructionUpate = true;
|
|
|
|
private Texture baseTexture = null;
|
|
private Texture baseTexture = null;
|
|
|
|
|
|
#if UNITY_EDITOR
|
|
#if UNITY_EDITOR
|
|
@@ -315,7 +314,7 @@ namespace Spine.Unity {
|
|
if (!this.IsValid) return;
|
|
if (!this.IsValid) return;
|
|
if (canvasRenderer.cull) return;
|
|
if (canvasRenderer.cull) return;
|
|
if (update == CanvasUpdate.PreRender) {
|
|
if (update == CanvasUpdate.PreRender) {
|
|
- if (requiresInstructionUpate) PrepareInstructionsAndRenderers(isInRebuild: true);
|
|
|
|
|
|
+ PrepareInstructionsAndRenderers(isInRebuild: true);
|
|
UpdateMeshToInstructions();
|
|
UpdateMeshToInstructions();
|
|
}
|
|
}
|
|
if (allowMultipleCanvasRenderers) canvasRenderer.Clear();
|
|
if (allowMultipleCanvasRenderers) canvasRenderer.Clear();
|
|
@@ -420,9 +419,7 @@ namespace Spine.Unity {
|
|
if (updateTiming == UpdateTiming.InLateUpdate)
|
|
if (updateTiming == UpdateTiming.InLateUpdate)
|
|
Update(unscaledTime ? Time.unscaledDeltaTime : Time.deltaTime);
|
|
Update(unscaledTime ? Time.unscaledDeltaTime : Time.deltaTime);
|
|
|
|
|
|
- PrepareInstructionsAndRenderers();
|
|
|
|
-
|
|
|
|
- SetVerticesDirty(); // triggers Rebuild and avoids potential double-update in a single frame
|
|
|
|
|
|
+ UpdateMesh();
|
|
}
|
|
}
|
|
|
|
|
|
protected void OnCullStateChanged (bool culled) {
|
|
protected void OnCullStateChanged (bool culled) {
|
|
@@ -468,11 +465,9 @@ namespace Spine.Unity {
|
|
public Skeleton Skeleton {
|
|
public Skeleton Skeleton {
|
|
get {
|
|
get {
|
|
Initialize(false);
|
|
Initialize(false);
|
|
- requiresInstructionUpate = true;
|
|
|
|
return skeleton;
|
|
return skeleton;
|
|
}
|
|
}
|
|
set {
|
|
set {
|
|
- requiresInstructionUpate = true;
|
|
|
|
skeleton = value;
|
|
skeleton = value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -722,7 +717,6 @@ namespace Spine.Unity {
|
|
}
|
|
}
|
|
|
|
|
|
public void PrepareInstructionsAndRenderers (bool isInRebuild = false) {
|
|
public void PrepareInstructionsAndRenderers (bool isInRebuild = false) {
|
|
- requiresInstructionUpate = false;
|
|
|
|
if (!this.allowMultipleCanvasRenderers) {
|
|
if (!this.allowMultipleCanvasRenderers) {
|
|
MeshGenerator.GenerateSingleSubmeshInstruction(currentInstructions, skeleton, null);
|
|
MeshGenerator.GenerateSingleSubmeshInstruction(currentInstructions, skeleton, null);
|
|
if (canvasRenderers.Count > 0)
|
|
if (canvasRenderers.Count > 0)
|