I don’t want a link to reference because it usually doesn’t help and I don’t want to be told to use a gui.skin or something.
Thanks
I don’t want a link to reference because it usually doesn’t help and I don’t want to be told to use a gui.skin or something.
Thanks
You would need to provide your own GUIStyle
object and then set its font GUIStyle.font
. You can then draw your button as follows:
public Font yourFont;
GUIStyle customButtonStyle;
void OnGUI() {
if (customButtonStyle == null) {
customButtonStyle = new GUIStyle(GUI.skin.button);
customButtonStyle.font = yourFont;
}
if (GUILayout.Button("My Button", customButtonStyle)) {
// XYZ...
}
}