In this recipe, you created a new Power property for your Shader Graph that combined with the Fresnel color effect so that a value of 0 will turn off the effect. You looked up the internal IDs of the Power and Color properties and updated the C# script so that it can update these properties.
The script class checks for the 0/1/2 keys and turns the effect off, to a red glow, or to a blue glow, respectively. The script class can influence the Shader Graph because we found the internal IDs that referred to the Power and Glow color variables.
By combining publicly exposed properties with code, we can change Shader Graph values at runtime through events detected by code.
At the time of writing this book, the current version of Shader Graph doesn't provide a convenient way to access exposed properties using the names chosen in the Shader Graph Blackboard, hence the need to look up the internal ID needed for the material.SetFloat(powerId, power) statement...