- Home /
Change the alingment of 2 GUILayout Label
Before hand, to any mod, yes i know this is a very simple question, and yes, i have looked every where!
but all tutorials or documentation, only shows how to make a label, i was not able to find any help on this
im doing a editor window, and i want to have a bold label with alingment in the center, as title, and then after that, one more label below with normal font style, and alingment to the left, the font style works, but for some reason the alingment affects the second label, even tho, i did ask it to be centered
this is what i get
and this is what i want to get
this is the code for my editor window script
private void OnGUI()
{
var titleStyle = GUIStyle.none;
titleStyle.alignment = TextAnchor.MiddleCenter;
titleStyle.fontSize = 15;
titleStyle.fontStyle = FontStyle.Bold;
GUILayout.Label("Developer Tools", titleStyle);
GUILayout.Label("OnRuntime Tools");
}
any help is appreciated :)
Your answer
Follow this Question
Related Questions
In custom editor window, label text in child windows sometimes becomes blurry 1 Answer
Custom Editor Struct array layout 0 Answers
How to combine two buttons in one. Editor window 2 Answers
Custom Editor - Is there any way to detect whether the user is in Prefab editing mode? 1 Answer
Set MinWidth for EditorWindow 1 Answer