I am writing my custom ShaderGUI, what I want is when I enable some toggle on my ShaderGUI, I check and create a script on that gameObject that passes down some parameters that my shader needs, and when I disable that toggle I delete that script.
So how can I get that gameObject in my custom ShaderGUi script?