Hi everybody. I try to change the material color from the Player on button click. Its works fine on the Editor Playmode. If i run the game on my mobile phone nothing happens when i click on the button. Does anyone have any idea why this is so and if so how can I fix it?
I add the shader to “Always Included Shaders” but it dint help.(GraphicsSettings.html?_ga=2.80946071.1645375285.1604758287-165643784.1603302988)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ShopChangeColor : MonoBehaviour
{
public Material myMaterials;
public Material myMaterials2;
public void ChangeMaterialPlayerBodyToRed()
{
myMaterials.color = Color.red;
}