Set texture / EnableKeyword not working in build

Hello. I have a script that changes a gameobject’s normal map when it’s damaged, and it works perfectly fine in the editor. However, when i build the project, it just doesnt work at all. It doesnt show any errors too, as i have a script that logs them in the build. Here are the important parts of the script:

void Start()
{
    gameObject.GetComponent<Renderer>().material.EnableKeyword("_NORMALMAP");
}

void OnCollisionEnter(Collision col)
{
    if(hp < maxhp * .66f && !crack1)
    {
        crack1 = true;
        gameObject.GetComponent<Renderer>().material.SetTexture("_BumpMap", Resources.Load("Crash1Map") as Texture);
        print("Crack1 procceeded, the texture is: " + Resources.Load("Crash1Map").name);
    }
    if (hp < maxhp * .33f && !crack2)
    {
        crack2 = true;
        gameObject.GetComponent<Renderer>().material.SetTexture("_BumpMap", Resources.Load("Crash2Map") as Texture);
        print("Crack2 procceeded, the texture is: " + Resources.Load("Crash1Map").name);
    }
}

Hi, did you find any solution to that. I have the same problem with setting material’s texture working in editor but not on windows and linux builds…

Same issue here, I wonder if this is common or occasional? Anyone else encountered this issue?

I have the same problem. Does anyone have a suggestion?

Maybe this would help
https://forum.unity.com/threads/enablekeyword-not-working-in-build.1328433/