public void SetHighlight()
{
Material material = GetComponent<MeshRenderer>().material;
material.EnableKeyword("_EMISSION");
material.SetColor("_EmissionColor", Color.HSVToRGB(1, 1, 1));
}
It works on editor mode , but not work on windows build
Pretty sure you should be accessing sharedMaterial
public void SetHighlight()
{
Material material = GetComponent<MeshRenderer>().sharedMaterial;
material.EnableKeyword("_EMISSION");
material.SetColor("_EmissionColor", Color.HSVToRGB(1, 1, 1));
}
Now I use sharedrender and I still can’t see the effect on the windows build