Acces to a material issue

Hello
I’m trying to acces to my material with a script
It can seem simple but I cant set the emission color with the code below, it just doesn’t works
( I have an instance which have the material on the scene before the playmode starts )


private Material matBane;
private Color colort1 = new Color(.2f, .1f, 0, 1);
void Start()
{
    matBane = GetComponentInChildren<SkinnedMeshRenderer>().material;
}

public void SetColor()
{
    matBane.EnableKeyword("_EMISSION");
    matBane.SetColor("_EmissionColor", colort1);
}

Try changing the material through the renderer. Any color should work, just threw the blue in as an example.

    private void Start()
    {
        gameObject.GetComponent<Renderer>().material.EnableKeyword("_EMISSION");
        gameObject.GetComponent<Renderer>().material.SetColor("_EmissionColor", Color.blue); 
    }