Update the GUI when string changes

I have a class that creates a GUI Box to be filled with information. The information is read from a text file and converted into a string. I know this works because using Debug.Log(string) gives me the contents of the file in the console.

The problem is, the changes to this string are done in Update() and I want to use the string in a GUI.Box
Can I update my OnGUI() method from Update()?

Are you reading a file on each iteration of the Update()? This sounds way too expensive, you should probably avoid that. But nevertheless, something like the below should work for you I hope:

string text;

void Update() {
	text = GetTextFromSomewhere();

void OnGUI() {
	GUI.Label( new Rect(...), text );

The changes on Update() will reflect on OnGUI() Method…

if this doesn’t works… try to create a display string variable, displaying it on OnGUI() method and changing it on Update()