GUI.Button & wordWrap

hello community, this question is about wordWrap. what is the way to code that in JS?

here's what ii tried:

setting wordWrap to true... didn't work... it said: "wordWrap" is not a member of UnityEngine.GUI

i have tried also adding a GUIStyle to a button... but it gets rid of teh default normal and hover texture... i want that, all i need is wordWrap, but how would you say:

GUI.Button(Rect(100,100,100,100), mssgToDisplay, wordWrap);

in a way / format that unity will recognize and accept?

thanks in advance!

Check out the auto layout... Might be what you want? Also, makes a new line.

Nevermind.... all you have to do if you want to only change the wordWrap setting is = true; //or false. typeOfGUI = ... the kind of gui you want to change the setting for.

ie for me,

function OnGUI()
{ = true;

 if(GUI.Button(Rect((Screen.width / 2) - (buttonWidth / 2), (Screen.height / 2) - (buttonHeight / 2), buttonWidth, buttonHeight), msgToDisplay))