|
Improve this Doc
View Source
CreateInputField(Transform, Vector2, Vector2, Vector2, ContentType, string, int, float, float)
Create a new InputField (Valheim style).
Declaration
public GameObject CreateInputField(Transform parent, Vector2 anchorMin, Vector2 anchorMax, Vector2 position, InputField.ContentType contentType = null, string placeholderText = null, int fontSize = 16, float width = 0, float height = 0)
Parameters
Type |
Name |
Description |
Transform |
parent |
Parent transform |
Vector2 |
anchorMin |
Min anchor |
Vector2 |
anchorMax |
Max anchor |
Vector2 |
position |
Position |
ContentType |
contentType |
Content type for the input field |
string |
placeholderText |
Text to display as a placeholder (can be null) |
int |
fontSize |
Optional font size, defaults to 16 |
float |
width |
Set width if > 0 |
float |
height |
Set height if > 0 |
Returns
Type |
Description |
GameObject |
Input field GameObject in Valheim style |