Update: Now that I understand more, I would like to make it clear to others who might struggle with this issue.
~~~~~~ ORIGINAL ENTRY... ~~~~~~ Spun on this too long... something does not add up. My ViewsBar.js creates the toolbar, buttons appear on screen and trigger/change shade on mouse click. All good.
Note: I should mention that if one sweeps the mouse pointer off the button before releasing the mouse button, the button still triggers - that is inconsistent with the behavior on other Windows buttons. It gives no chance to cancel the action if the wrong button was clicked.
ERROR: Assets/Standard Assets/Camera Scripts/SmoothFollow.js(31,15): BCE0005: Unknown identifier: 'ViewsBar'.
How do I read the status of the buttons in the toolbar from the smoothfollow script so I can adjust the camera location accordingly?
For your specific problem, static var toolbarInt = 0; would work, but it sounds like it can't find your script.
Smoothfollow is probably the one from standard assets? If that's the case, it can't find your other script because standard assets is compiled earlier
You could try moving it out of the folder somewhere else
Alternatively - do it the other way round. Have a function on your smoothfollow script which lets you set the current behaviour (from your other script)
That means that you're not adding game specific code into the follow script, just adding more features