mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[unity] Fixed RenderExistingMesh resetting material mapping if MeshFilter added after Awake. Closes #3014.
This commit is contained in:
parent
06d5d32a41
commit
3ba6e0f789
@ -148,7 +148,11 @@ namespace Spine.Unity.Examples {
|
|||||||
void UpdateMaterials () {
|
void UpdateMaterials () {
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
if (!referenceRenderer) return;
|
if (!referenceRenderer) return;
|
||||||
if (!referenceMeshFilter) Reset();
|
if (!referenceMeshFilter) {
|
||||||
|
referenceMeshFilter = referenceRenderer.GetComponent<MeshFilter>();
|
||||||
|
if (!referenceMeshFilter)
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
ownMeshFilter.sharedMesh = referenceMeshFilter.sharedMesh;
|
ownMeshFilter.sharedMesh = referenceMeshFilter.sharedMesh;
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "com.esotericsoftware.spine.spine-unity",
|
"name": "com.esotericsoftware.spine.spine-unity",
|
||||||
"displayName": "spine-unity Runtime",
|
"displayName": "spine-unity Runtime",
|
||||||
"description": "This plugin provides the spine-unity runtime core and examples. Spine Examples can be installed via the Samples tab.",
|
"description": "This plugin provides the spine-unity runtime core and examples. Spine Examples can be installed via the Samples tab.",
|
||||||
"version": "4.3.39",
|
"version": "4.3.40",
|
||||||
"unity": "2018.3",
|
"unity": "2018.3",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Esoteric Software",
|
"name": "Esoteric Software",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user