mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[unity] Prevent null reference exception when using Advanced - Fix Draw Order and disabling the renderer and/or GameObject.
This commit is contained in:
parent
e425d64d2c
commit
1e888db53a
@ -690,6 +690,9 @@ namespace Spine.Unity {
|
||||
}
|
||||
|
||||
for (int i = 0; i < meshRenderer.sharedMaterials.Length; ++i) {
|
||||
if (!meshRenderer.sharedMaterials[i])
|
||||
continue;
|
||||
|
||||
if (!hasPerRendererBlock) meshRenderer.GetPropertyBlock(reusedPropertyBlock, i);
|
||||
// Note: this parameter shall not exist at any shader, then Unity will create separate
|
||||
// material instances (not in terms of memory cost or leakage).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user