mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed compile error for older Unity versions introduced by last commit 60e67017. See #1316.
This commit is contained in:
parent
60e67017e6
commit
6c24aceab3
@ -31,6 +31,10 @@
|
|||||||
#define NEW_PREFAB_SYSTEM
|
#define NEW_PREFAB_SYSTEM
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_2018_2_OR_NEWER
|
||||||
|
#define HAS_CULL_TRANSPARENT_MESH
|
||||||
|
#endif
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -668,7 +672,9 @@ namespace Spine.Unity {
|
|||||||
|
|
||||||
BlendModeMaterials blendModeMaterials = skeletonDataAsset.blendModeMaterials;
|
BlendModeMaterials blendModeMaterials = skeletonDataAsset.blendModeMaterials;
|
||||||
bool hasBlendModeMaterials = blendModeMaterials.RequiresBlendModeMaterials;
|
bool hasBlendModeMaterials = blendModeMaterials.RequiresBlendModeMaterials;
|
||||||
|
#if HAS_CULL_TRANSPARENT_MESH
|
||||||
bool mainCullTransparentMesh = this.canvasRenderer.cullTransparentMesh;
|
bool mainCullTransparentMesh = this.canvasRenderer.cullTransparentMesh;
|
||||||
|
#endif
|
||||||
bool pmaVertexColors = meshGenerator.settings.pmaVertexColors;
|
bool pmaVertexColors = meshGenerator.settings.pmaVertexColors;
|
||||||
int targetSiblingIndex = 0;
|
int targetSiblingIndex = 0;
|
||||||
for (int i = 0; i < submeshCount; i++) {
|
for (int i = 0; i < submeshCount; i++) {
|
||||||
@ -723,8 +729,10 @@ namespace Spine.Unity {
|
|||||||
usedMaterial = screenMaterial;
|
usedMaterial = screenMaterial;
|
||||||
|
|
||||||
canvasRenderer.SetMaterial(usedMaterial, usedTexture);
|
canvasRenderer.SetMaterial(usedMaterial, usedTexture);
|
||||||
|
#if HAS_CULL_TRANSPARENT_MESH
|
||||||
canvasRenderer.cullTransparentMesh = allowCullTransparentMesh ?
|
canvasRenderer.cullTransparentMesh = allowCullTransparentMesh ?
|
||||||
mainCullTransparentMesh : false;
|
mainCullTransparentMesh : false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var originalTexture = submeshMaterial.mainTexture;
|
var originalTexture = submeshMaterial.mainTexture;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user