I make s shader file and drop it on object with material. I wrote this script to run shader when press Space button. All is good except that script not load shader when run the game !! I have to do it manually only !
public Material _shader;
public float timer = 0;
// Start is called before the first frame update
void Start()
{
_shader = gameObject.GetComponent<Material>(); // Not setting shader !!
_shader.SetFloat("Vector1_F92326F1", timer);
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Space))
{
timer += 0.1f;
_shader.SetFloat("Vector1_F92326F1", timer);
}
}