RealDocs

UKismetMathLibrary::Conv_IntToIntVector2

function Engine Blueprint Since 5.2
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticBlueprintPureBlueprintAutocast

Description

Broadcasts a single integer to both components of an FIntVector2, producing (InInt, InInt).

Caveats & Gotchas

  • Both X and Y receive the same value — a broadcast, not a partial initialisation. To set only one axis use FIntVector2(InInt, 0) directly.
  • FIntVector2 was introduced in UE 5.2. Using this function in projects targeting earlier engine versions will fail to compile.

Signature

static UE_INL_API FIntVector2 Conv_IntToIntVector2(int32 InInt)

Parameters

Name Type Description Default
InInt int32 The integer value to broadcast to both components.

Return Type

FIntVector2

Example

Uniform 2D tile size C++
int32 TileSize = 64;
FIntVector2 TileDimensions = UKismetMathLibrary::Conv_IntToIntVector2(TileSize);
// TileDimensions == FIntVector2(64, 64)

Version History

Introduced in: 5.2

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.