Setting up GUIStyles, best practice.

Level - Novice

Hello, I’m working on a little game using a lot of gui elements and as I was looking over my code I realized that my GUIStyles are being called every frame from onGui, when really the styles (some of which I use in multiple places) only ever need to be setup once. I thought I would set them up somewhere else and just pass them to the functions I’m using in onGUI but I get “you can only call gui functions in ongui”.

Is it more efficient (and good practice) to go through the effort of setting them up somewhere else, or is calling these styles, however many, every frame inconsequential?

Check out GUISkins.