So I’ve been having troubles with GUI, thing is I want to make things outside of the OnGUI() Function, is there anyway I can do this?
What kind of problems did you have?
If you mean you want to create/draw GUI controls from outside OnGUI(), it can’t be done. GUI functions can only be called from OnGUI(). You can have code elsewhere that sets a flag (or creates other data) which is then checked for in OnGUI(), though.
What kind of things are you trying to create outside the OnGUI()? All you have to do is create a custom function and call on it from insde the OnGUI().
function OnGUI(){
MyCustom();
}
function MyCustom() {
//Cut the grass
}
Inside your Custom Function You can have guiElements.
Remember that the function is called all the time unless you use conditions ect to only call it once.