mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 08:38:43 +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
|
||||
#endif
|
||||
|
||||
#if UNITY_2018_2_OR_NEWER
|
||||
#define HAS_CULL_TRANSPARENT_MESH
|
||||
#endif
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
@ -668,7 +672,9 @@ namespace Spine.Unity {
|
||||
|
||||
BlendModeMaterials blendModeMaterials = skeletonDataAsset.blendModeMaterials;
|
||||
bool hasBlendModeMaterials = blendModeMaterials.RequiresBlendModeMaterials;
|
||||
#if HAS_CULL_TRANSPARENT_MESH
|
||||
bool mainCullTransparentMesh = this.canvasRenderer.cullTransparentMesh;
|
||||
#endif
|
||||
bool pmaVertexColors = meshGenerator.settings.pmaVertexColors;
|
||||
int targetSiblingIndex = 0;
|
||||
for (int i = 0; i < submeshCount; i++) {
|
||||
@ -723,8 +729,10 @@ namespace Spine.Unity {
|
||||
usedMaterial = screenMaterial;
|
||||
|
||||
canvasRenderer.SetMaterial(usedMaterial, usedTexture);
|
||||
#if HAS_CULL_TRANSPARENT_MESH
|
||||
canvasRenderer.cullTransparentMesh = allowCullTransparentMesh ?
|
||||
mainCullTransparentMesh : false;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
var originalTexture = submeshMaterial.mainTexture;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user