[unity] Fixed RenderExistingMesh resetting material mapping if MeshFilter added after Awake. Closes #3014.

This commit is contained in:
Harald Csaszar 2026-01-26 18:30:43 +01:00
parent 06d5d32a41
commit 3ba6e0f789
2 changed files with 6 additions and 2 deletions

View File

@ -148,7 +148,11 @@ namespace Spine.Unity.Examples {
void UpdateMaterials () {
#if UNITY_EDITOR
if (!referenceRenderer) return;
if (!referenceMeshFilter) Reset();
if (!referenceMeshFilter) {
referenceMeshFilter = referenceRenderer.GetComponent<MeshFilter>();
if (!referenceMeshFilter)
Reset();
}
#endif
ownMeshFilter.sharedMesh = referenceMeshFilter.sharedMesh;

View File

@ -2,7 +2,7 @@
"name": "com.esotericsoftware.spine.spine-unity",
"displayName": "spine-unity Runtime",
"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",
"author": {
"name": "Esoteric Software",