mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[unity] Fixed casting exception when use custom atlas asset. Closes #1342.
This commit is contained in:
parent
533203bf32
commit
cd703b38cf
@ -1362,9 +1362,9 @@ namespace Spine.Unity.Editor {
|
|||||||
|
|
||||||
bool pmaVertexColors = false;
|
bool pmaVertexColors = false;
|
||||||
bool tintBlack = false;
|
bool tintBlack = false;
|
||||||
foreach (SpineAtlasAsset atlasAsset in skeletonDataAsset.atlasAssets) {
|
foreach (AtlasAssetBase atlasAsset in skeletonDataAsset.atlasAssets) {
|
||||||
if (!pmaVertexColors) {
|
if (!pmaVertexColors) {
|
||||||
foreach (Material m in atlasAsset.materials) {
|
foreach (Material m in atlasAsset.Materials) {
|
||||||
if (m.shader.name.Contains(PMAShaderQuery)) {
|
if (m.shader.name.Contains(PMAShaderQuery)) {
|
||||||
pmaVertexColors = true;
|
pmaVertexColors = true;
|
||||||
break;
|
break;
|
||||||
@ -1373,7 +1373,7 @@ namespace Spine.Unity.Editor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!tintBlack) {
|
if (!tintBlack) {
|
||||||
foreach (Material m in atlasAsset.materials) {
|
foreach (Material m in atlasAsset.Materials) {
|
||||||
if (m.shader.name.Contains(TintBlackShaderQuery)) {
|
if (m.shader.name.Contains(TintBlackShaderQuery)) {
|
||||||
tintBlack = true;
|
tintBlack = true;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user