In my current project, I’m trying to set up a new data type so I can get a script off a game object and enable/disable it on a keystroke. All of my syntax seems to be correct, except for the fact that my new data type isn’t being established as I expected it to. Currently I just have things as follows:
private ScriptToToggle script;
public void TinSight()
{
script = GetComponent("ContrastEnhance");
if (useTin == true)
{
Time.timeScale = 0.8f;
}
Time.timeScale = 1.0f;
}
}
I must be missing something here, because with things as they are now I get the “type or namespace name ‘ScriptToToggle’ could not be found” error. I’m sure I’m missing something obvious, but would someone mind pointing out my mistake?