Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

GUIStyle.Draw

Switch to Manual
public function Draw(position: Rect, isHover: bool, isActive: bool, on: bool, hasKeyboardFocus: bool): void;

Parameters

Description

Draw this GUIStyle on to the screen, internal version.

Draw plain GUIStyle without text nor image.


public function Draw(position: Rect, text: string, isHover: bool, isActive: bool, on: bool, hasKeyboardFocus: bool): void;

Parameters

Description

Draw the GUIStyle with a text string inside.


public function Draw(position: Rect, image: Texture, isHover: bool, isActive: bool, on: bool, hasKeyboardFocus: bool): void;

Parameters

Description

Draw the GUIStyle with an image inside. If the image is too large to fit within the content area of the style it is scaled down.


public function Draw(position: Rect, content: GUIContent, controlID: int, on: bool = false): void;
public function Draw(position: Rect, content: GUIContent, isHover: bool, isActive: bool, on: bool, hasKeyboardFocus: bool): void;

Parameters

Description

Draw the GUIStyle with text and an image inside. If the image is too large to fit within the content area of the style it is scaled down.