This is my shader graph and it's properties :
and
This script is attached to two objects on my player and make the shader to work on them :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ChangeShaders : MonoBehaviour
{
public Shader _shader;
// Start is called before the first frame update
void Start()
{
ChangeShader();
}
private void ChangeShader()
{
gameObject.GetComponent<Renderer>().material.shader = _shader;
}
}
What I forgot for example is where and how I make the shader to nonstop fade in out ? I want to add to my script a bool flag to decide if to make it like now automatic fade in out or only once to fade out or once to fade in or to add another flag and if its not automatic if the the flag true or false fade in out only once.
and other properties too to add to my script like changing colors and other stuff.
My whole project can be find here in github a very small project :

