mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[unity] Fixed compile error of previous commit 238818d on Unity 2017. See #2358.
This commit is contained in:
parent
238818dd13
commit
a740fae009
@ -30,6 +30,11 @@
|
|||||||
#if UNITY_2018_3 || UNITY_2019 || UNITY_2018_3_OR_NEWER
|
#if UNITY_2018_3 || UNITY_2019 || UNITY_2018_3_OR_NEWER
|
||||||
#define NEW_PREFAB_SYSTEM
|
#define NEW_PREFAB_SYSTEM
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_2018_1_OR_NEWER
|
||||||
|
#define HAS_PROPERTY_BLOCK_QUERY
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SPINE_OPTIONAL_RENDEROVERRIDE
|
#define SPINE_OPTIONAL_RENDEROVERRIDE
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -207,7 +212,11 @@ namespace Spine.Unity {
|
|||||||
int rendererCount = partsRenderers.Count;
|
int rendererCount = partsRenderers.Count;
|
||||||
if (rendererCount <= 0) return;
|
if (rendererCount <= 0) return;
|
||||||
|
|
||||||
|
#if HAS_PROPERTY_BLOCK_QUERY
|
||||||
bool assignPropertyBlock = this.copyPropertyBlock && mainMeshRenderer.HasPropertyBlock();
|
bool assignPropertyBlock = this.copyPropertyBlock && mainMeshRenderer.HasPropertyBlock();
|
||||||
|
#else
|
||||||
|
bool assignPropertyBlock = this.copyPropertyBlock;
|
||||||
|
#endif
|
||||||
if (assignPropertyBlock)
|
if (assignPropertyBlock)
|
||||||
mainMeshRenderer.GetPropertyBlock(copiedBlock);
|
mainMeshRenderer.GetPropertyBlock(copiedBlock);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user