Attaching Camera And GUIText via Scripting

I know how to assign a transform to the camera’s smooth follow script via the drag and drop method in the inspector. Same for exposing variables for GIUText and assigning them by way of the inspector.

I’d like to do both in a script. How can that be done?

Thanks.

Mitch

theObject.GetComponent(SmoothFollow).target = newTarget;
theObject.guiText.text = "I pity the fool";

Does that help?

Yes, it does, Yoggy. Thank you kindly.