So after you create the shader and apply it, you will notice that in the battle System, you lose the blinking red color when they are hit. To fix that, you need to add in another parameter in the Shader:
Open your Battle Visual Prefab (i just chose the Clair Battle Visual). Click on your Clair sprite, and under Shader, click the “Edit” Button
On the Blackboard, you want to add in a “Color” parameter - You can just leave the name “Color” (do not change the color, it should be black by default)
Drag the “Color” parameter next to your “Sample 2D texture” node. Right click and “Create Node” in the search, you can type in “Add” and just add in an “Add” node
From the “Sample Texture 2D,” connect the “RGB4” to the “A” on the “Add” node. Connect the “Color” parameter to “B” of the “Add” node, and from the “Add” node, connect the “Out(4)” of the “Add” node to the “Base Color” of the “Fragment” section.
Save the asset and you can close the Shader Graph.
To fix the Hit animation issue, go back to your Battle Visual Prefab (I’m using the Claire battle visual), and click on the Clair battle visual in the Hierarchy, then click Window → Animation → Animation to open your animation window.
You should now see the animation window. In the animation window, click the dropdown where it says “Idle” and click the “Hit” animation
If you hit the “Play” button, you will notice that Claire does not blink red anymore. To fix this, in the ANimation window, select “Claire: Color” and delete it - we no longer need this (after you select it, simply hit the delete key or right-click and “remove Properties”)
in the animation window, click the “Record” button (the red circle button) and select the “Claire” sprite in the hierarchy.
Make sure in your animation window you are on Frame 0, and in the inspector under your shader graph, you now see a “Color” option. Click on it and change your color to “Red.” When you do that, you should see a new property appear in your animation window called “Claire: material.color”
Now in the animation windows, click on Frame 5 and change the color back to Black. You should now have 2 key frames for the color. Now click the record button to stop recording.
When you hit the play button, you should now see Clair blinking red. For your other battle visuals, simply go through the animation window for their Hit animations and change it as you did Claire.
Hope this