Skip to content

Commit

Permalink
fix: disable shader resolve, seems to be causing problems
Browse files Browse the repository at this point in the history
  • Loading branch information
sirskunkalot committed Jul 25, 2022
1 parent d54daf5 commit 0e41f68
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
# Changelog

## Version 2.7.5
* Disabled mock shader resolve, seems to be causing problems and needs to be investigated more

## Version 2.7.4
* Changed that non-resolvable mock textures on a material only print a warning instead of skipping the whole prefab
* Fixed mock system did not resolve some arrays correctly
Expand Down
20 changes: 10 additions & 10 deletions JotunnLib/Managers/MockSystem/MockManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,16 +343,16 @@ private static void FixMaterial(Material material)
}
}

Shader usedShader = material.shader;

if (usedShader)
{
Shader realShader = Shader.Find(usedShader.name) ?? PrefabManager.Cache.GetPrefab<Shader>(usedShader.name);
if (realShader && realShader != usedShader)
{
material.shader = realShader;
}
}
// Shader usedShader = material.shader;
//
// if (usedShader)
// {
// Shader realShader = Shader.Find(usedShader.name) ?? PrefabManager.Cache.GetPrefab<Shader>(usedShader.name);
// if (realShader && realShader != usedShader)
// {
// material.shader = realShader;
// }
// }
}
}
}

0 comments on commit 0e41f68

Please sign in to comment.