ARCore – not changing alpha on material after changing BlendMode through code.

Anyone got any ideas why in ARCore I’m not seeing a smooth fade of the material after I change the material blend mode?
I’ve tested the following code and in the editor/Game mode it’s working fine.
Also the fade routine is working fine in ARCore if I set the material blend mode to “standard>fade” (or transparent) in the Material Inspector, then the routine works fine and I get a nice fade in ARCore and the editor.

However, I need to switch modes on the fly as I have multiple items to fade out and I can’t get Unity to play well with them (z-sorting issues).
So the best logic I can find is to change the blend mode whilst fading in/out, then set to “Standard > Opaque” once done.
BUT…. This does not appear to be working in ARCore.
I see the modes are changing, as you can see z-buffering sorting issues come and go as it switches between modes, but the fading is no longer happening.

Any ideas?

Thanks in advance for any help

void Start()
        myRenderer = GetComponent<Renderer>();
        solidColor = myRenderer.material.color;
        fadedColor = new Color(solidColor.r, solidColor.g, solidColor.b, 0f);
      //  myRenderer.material.renderQueue = 4001;
        material = myRenderer.material;
    public void startFading()
       // go = true;
        Debug.Log("startFading - bb-working");
        if (!fading)


    IEnumerator Fade()

        material.SetFloat("_Mode", 2);
        material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
        material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
        material.SetInt("_ZWrite", 0);
        material.renderQueue = 3000;

        Debug.Log("coruntine started for skin");
        fading = true;
        Color fromColor = faded ? fadedColor : solidColor;
        Color toColor = faded ? solidColor : fadedColor;
        for (var t = 0f; t < fadeTime; t += Time.deltaTime)
            Debug.Log("fading skin");
            //currentColor = Color.Lerp(fromColor, toColor, t / fadeTime);
            myRenderer.material.color = Color.Lerp(fromColor, toColor, t / fadeTime);
            yield return null;
        if (toColor == solidColor)
            material.SetFloat("_Mode", 0);
            material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
            material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero);
            material.SetInt("_ZWrite", 1);
            material.renderQueue = -1;

        fading = false;
        faded = !faded;

Right, Solved it! So you have to read the fine print.
“Material of that type in your Assets. The material must be used in a scene”

(part 2 at the bottom)

So the issue was that it ran in the editor fine, but when built it stripped out all unused materials and I did not have a material using the Transparent shade in, and therefore it didn’t work.
All I did was include a object with a “standard > transparent” material on in the scene and it works!!!