mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
Merge branch '4.1' into 4.2-beta
This commit is contained in:
commit
03b6a397d9
@ -30,6 +30,11 @@
|
||||
#if UNITY_2018_3 || UNITY_2019 || UNITY_2018_3_OR_NEWER
|
||||
#define NEW_PREFAB_SYSTEM
|
||||
#endif
|
||||
|
||||
#if UNITY_2018_1_OR_NEWER
|
||||
#define HAS_PROPERTY_BLOCK_QUERY
|
||||
#endif
|
||||
|
||||
#define SPINE_OPTIONAL_RENDEROVERRIDE
|
||||
|
||||
using System.Collections.Generic;
|
||||
@ -207,7 +212,12 @@ namespace Spine.Unity {
|
||||
int rendererCount = partsRenderers.Count;
|
||||
if (rendererCount <= 0) return;
|
||||
|
||||
if (copyPropertyBlock)
|
||||
#if HAS_PROPERTY_BLOCK_QUERY
|
||||
bool assignPropertyBlock = this.copyPropertyBlock && mainMeshRenderer.HasPropertyBlock();
|
||||
#else
|
||||
bool assignPropertyBlock = this.copyPropertyBlock;
|
||||
#endif
|
||||
if (assignPropertyBlock)
|
||||
mainMeshRenderer.GetPropertyBlock(copiedBlock);
|
||||
|
||||
MeshGenerator.Settings settings = new MeshGenerator.Settings {
|
||||
@ -234,9 +244,8 @@ namespace Spine.Unity {
|
||||
MeshGenerator meshGenerator = currentRenderer.MeshGenerator;
|
||||
meshGenerator.settings = settings;
|
||||
|
||||
if (copyPropertyBlock)
|
||||
if (assignPropertyBlock)
|
||||
currentRenderer.SetPropertyBlock(copiedBlock);
|
||||
|
||||
// Render
|
||||
currentRenderer.RenderParts(instruction.submeshInstructions, start, si + 1);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "com.esotericsoftware.spine.spine-unity",
|
||||
"displayName": "spine-unity Runtime",
|
||||
"description": "This plugin provides the spine-unity runtime core.",
|
||||
"version": "4.2.19",
|
||||
"version": "4.2.20",
|
||||
"unity": "2018.3",
|
||||
"author": {
|
||||
"name": "Esoteric Software",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user