Possible to fade alpha of texture using Particles/Additive shader?

Hi,

I’m trying to fade a texture which uses this shader but can’t seem to get the alpha to change on screen. It seems to read the initial alpha value as 0 (when it should be 0.5).

Can anyone tell me where I might be going wrong?

The script I am using is below:

Thanks

    {
        // The current colour value of the renderer
        exhaustTempColor = PlayerExhaust_Thrust_1.material.color;

        Debug.Log("exhaustTempColor.color = " + exhaustTempColor);

        if (fadeFlag == true)
        {
            while (exhaustAlphaValue > ExhaustLowTargetAlpha)
            {
                Debug.Log("FADING OUT EXHAUSTS");

                Debug.Log("Exhaust Alpha = " + PlayerExhaust_Thrust_1.material.color.a);

                yield return new WaitForEndOfFrame();

                // The current alpha value of the renderer
                exhaustTempColor.a = exhaustAlphaValue;

                // Exhaust 1
                PlayerExhaust_Thrust_1.material.color = exhaustTempColor;                         

                // Decrease the alpha value of the renderer
                exhaustAlphaValue -= Time.deltaTime * fadingSpeed;
            }
        }

        if (fadeFlag == false)
        {
            Debug.Log("FADING IN EXHAUSTS");

            Debug.Log("Exhaust Alpha = " + PlayerExhaust_Thrust_1.material.color.a);

            yield return new WaitForEndOfFrame();

            // The current alpha value of the renderer
            exhaustTempColor.a = exhaustAlphaValue;
      
            PlayerExhaust_Thrust_1.material.color = exhaustTempColor;

            // Decrease the alpha value of the renderer
            exhaustAlphaValue = 0.5f;
        }

        // The current alpha value of the renderer
        exhaustTempColor.a = exhaustAlphaValue;

        // Exhaust 1
        PlayerExhaust_Thrust_1.material.color = exhaustTempColor;              
    }

You might try setting

PlayerExhaust_Thrust_1.sharedMaterial.color = exhaustTempColor;

instead. If you tell me how it’s being use (particles or what) there may be other options

Thanks for the reply.
Well I have a texture which is being used as an exhaust which animates back and forth, etc. I am using the Particles/Additive shader as it seems to be the one that gives the appearance I want.

I have just done some reading and it appears as though this shader doesn’t have a color component, but a TintColor? I’m not sure whether this is correct or not but any information you can provide on how to fade the texture would be great. I hope that helps.