About 154,000 results
Open links in new tab
  1. Scripting API: GUI.color - Unity

    Applies a global tint to the GUI. The tint affects backgrounds and text colors. The tint is applied when Unity draws the content. It multiplies this property by the current color, and uses the resulting color to draw the content.

  2. How to change text color on GUI.Label? - Unity Discussions

    Jun 17, 2010 · How do I change the color of the text color in my GUI.Label? Lets say into black. function OnGUI {GUI.Label (Rect (400, 200, 200, 60), “color”);} You can do it by setting up a custom GUIStyle. var style : GUIStyle; Add this to the script. Then you can either tweak the color in the Inspector or code the color inside the script.

  3. Change GUI.Box Color? - Unity Engine - Unity Discussions

    Mar 19, 2013 · GUI.color is great, but results in black text for Box. You can change the text with a GUIStyle, but then GUI.color is ignored (nothing to tint). You can add a texture to your GUIStyle, but then your text and background are tinted the same (can’t have white text). You can use GUI.backgroundColor instead of GUI.color, and then you’re good!

  4. Change GUI Font size and Color? - Unity Discussions

    Mar 27, 2010 · If you just want to change the color, you can use GUI.contentColor. (There's also GUI.color and GUI.backgroundColor.) You can scale content without having to use new styles or import fonts at different sizes by changing GUI.matrix, but it won't be pixel-perfect in that case.

  5. unity - How to change GUI box background color for each gui

    Apr 21, 2022 · Modify the global color of GUI and restore it after use. This preserves the style of the default button.

  6. How to I change my font size and color with Unity GUI?

    Apr 21, 2022 · And in order to change the label colour - this is working code: I think that you should do var myFont : GUIStyle; instead. After that you can modify the style in the inspector. Try to give a better read on that page on Unity manual on how to use it accordingly: https://docs.unity3d.com/Manual/class-GUIStyle.html. Or.

  7. Change Unity GUI.Box text colour - Stack Overflow

    GUI.skin.box.normal.textColor = Color.red; Perhaps a better way is take a look at GUIStyles (http://docs.unity3d.com/Documentation/Components/class-GUIStyle.html) since GUIStyle is an easy way to modify the appearance of the whole GUI.

  8. Scripting API: GUI.color - Unity

    Global tinting color for the GUI. This will affect both backgrounds & text colors. See Also: backgroundColor, contentColor. Yellow Color on the GUI Controls. // Tints all GUI drawn elements with yellow. void OnGUI() GUI.color = Color.yellow; GUI.Label (new Rect (10, 10, 100, 20), "Hello World!"); GUI.Box (new Rect (10, 50, 50, 50), "A BOX");

  9. Unity - Set GUI.Box background color - Stack Overflow

    Oct 21, 2020 · GUI.Box(new Rect(x, y, 200, 200), LatLong); However, the box is showing in a semi-transparent black, and the white text is subdued, not opaque white. The default box image is black, so to change its color makes no sense. You can create a custom GUI skin by 'Assets > Create > GUI Skin'.

  10. How To Show GUI components in OnGUI method and change …

    Now, you know how you can change Text color, size, font and Alignment in Unity. You can include all these properties like this: GUIStyle guiStyle = new GUIStyle(GUI.skin.label); guiStyle.fontSize = 36; guiStyle.normal.textColor = Color.white; //Load and set Font Font myFont = (Font)Resources.Load("Fonts/AMERICANCAPTAINWEBFONT", typeof(Font ...

  11. Some results have been removed