Skip to content

Commit

Permalink
Release 16, fixing big bad diffuse crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
R-T-B committed Aug 14, 2020
1 parent 8f8c612 commit 0199fcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/Kopernicus/Components/MaterialWrapper/NormalDiffuse.cs
Expand Up @@ -15,7 +15,10 @@ public class NormalDiffuse : Material
protected class Properties
{
// Return the shader for this wrapper
private const String SHADER_NAME = "Standard (Specular setup)";
private const String SHADER_NAME = "Legacy Shaders/Diffuse";

//For those weird diffuse shaders
public const string ALT_SHADER_NAME = "Standard (Specular setup)";

public static Shader Shader
{
Expand Down Expand Up @@ -99,7 +102,7 @@ public NormalDiffuse(String contents) : base(contents)
public NormalDiffuse(Material material) : base(material)
{
// Throw exception if this material was not the proper material
if (material.shader.name != Properties.Shader.name)
if ((material.shader.name != Properties.Shader.name) && (material.shader.name != Properties.ALT_SHADER_NAME))
{
throw new InvalidOperationException("Type Mismatch: Diffuse shader required");
}
Expand Down
2 changes: 1 addition & 1 deletion src/Kopernicus/Constants/CompatibilityChecker.cs
Expand Up @@ -51,7 +51,7 @@ public class CompatibilityChecker : MonoBehaviour
internal const Int32 VERSION_MAJOR = 1;
internal const Int32 VERSION_MINOR = 10;
internal const Int32 REVISION = 1;
internal const Int32 KOPERNICUS = 15;
internal const Int32 KOPERNICUS = 16;

public static Boolean IsCompatible()
{
Expand Down

0 comments on commit 0199fcc

Please sign in to comment.