|
Edit this page
View Source
Create a new button (Valheim style).
Declaration
public GameObject CreateButton(string text, Transform parent, Vector2 anchorMin, Vector2 anchorMax, Vector2 position, float width = 0, float height = 0)
Parameters
| Type |
Name |
Description |
| string |
text |
Text to display on the button |
| Transform |
parent |
Parent transform |
| Vector2 |
anchorMin |
Min anchor |
| Vector2 |
anchorMax |
Max anchor |
| Vector2 |
position |
Position |
| float |
width |
Set width if > 0 |
| float |
height |
Set height if > 0 |
Returns
| Type |
Description |
| GameObject |
Button GameObject in Valheim style |