Skip to content

Game.UI.Widgets.Int2InputField

Assembly: Assembly-CSharp (game assembly)
Namespace: Game.UI.Widgets

Type: class

Base: IntField

Summary:
Int2InputField is a minimal concrete UI input widget for editing 2D integer vectors (Unity.Mathematics.int2). The class itself contains no added logic or state; it simply specializes the generic IntField for the int2 type so the existing IntField functionality can be used for two-component integer values in the game's UI. This class is intended to be used by modders or UI code that needs an input field specifically typed to int2, or to be subclassed when custom behavior for int2 input is required.


Fields

  • This class declares no additional fields.
    All storage and backing fields (if any) are provided by the generic base class IntField or its base types.

Properties

  • This class declares no additional properties.
    Any public properties for getting/setting the value, validation, event callbacks, etc., are inherited from IntField (and its base classes). Refer to IntField documentation for the exact property names and behavior.

Constructors

  • public Int2InputField()
    This type does not declare a constructor explicitly; the compiler-provided parameterless constructor is used. No additional initialization logic is performed by this class itself.

Methods

  • This class declares no additional methods.
    All runtime behavior (creation, rendering, input handling, validation, events) is inherited from IntField. To customize behavior, override relevant protected/virtual methods from IntField (for example creation/initialization hooks, value-change handlers, etc.) in a subclass.

Usage Example

using Unity.Mathematics;
using Game.UI.Widgets;

// Create an instance (usage depends on your UI framework/context)
var int2Field = new Int2InputField();

// Typical IntField<T> APIs vary; if IntField exposes a Value property:
// (Replace with the actual API of IntField<int2> in the game's code)
int2Field.Value = new int2(10, 20);

// To customize behavior, subclass Int2InputField and override relevant methods:
public class MyInt2Field : Int2InputField
{
    // override creation/initialization hooks here if available on the base class
}

Notes for modders: - Make sure to include Unity.Mathematics if you use int2.
- Consult the IntField implementation to see available properties/events (e.g., Value, OnValueChanged) and what virtual methods you can override to extend behavior.