SeinARTS UI Library
Class · USeinUIBPFL : UBlueprintFunctionLibrary
#include "Lib/SeinUIBPFL.h"
Utility nodes for UI: entity name, icon, portrait and relation lookups, fixed-point conversion, resource cost text, screen projection, minimap math, and action slot data.
Blueprint nodes
Section titled “Blueprint nodes”UI / Entity
Get Entity Display Name
Section titled “Get Entity Display Name”Get an entity’s display name from its Identity Data.
static FText SeinGetEntityDisplayName(const UObject* WorldContextObject, FSeinEntityHandle Handle);Get Entity Icon
Section titled “Get Entity Icon”Get an entity’s icon texture from its Identity Data.
static UTexture2D* SeinGetEntityIcon(const UObject* WorldContextObject, FSeinEntityHandle Handle);Get Entity Portrait
Section titled “Get Entity Portrait”Get an entity’s portrait texture from its Identity Data.
static UTexture2D* SeinGetEntityPortrait(const UObject* WorldContextObject, FSeinEntityHandle Handle);Get Entity Identity Tag
Section titled “Get Entity Identity Tag”Get an entity’s identity tag (from its Identity Data).
static FGameplayTag SeinGetEntityIdentityTag(const UObject* WorldContextObject, FSeinEntityHandle Handle);Get Entity Relation
Section titled “Get Entity Relation”How a player sees an entity: friendly, enemy or neutral.
static ESeinRelation SeinGetEntityRelation(const UObject* WorldContextObject, FSeinEntityHandle Handle, FSeinPlayerID PlayerID);UI / Math
Fixed To Float
Section titled “Fixed To Float”Convert a FFixedPoint value to float for display.
static float SeinFixedToFloat(FFixedPoint Value);Fixed Vector To Vector
Section titled “Fixed Vector To Vector”Convert a FFixedVector to FVector for display.
static FVector SeinFixedVectorToVector(const FFixedVector& Value);UI / Format
Format Resource Cost
Section titled “Format Resource Cost”Turns a resource cost map into text such as 100 Manpower, 50 Fuel, using each resource tag’s last name and rounding amounts. An empty cost reads Free.
static FText SeinFormatResourceCost(const TMap<FGameplayTag, float>& Cost);UI / Projection
World To Screen
Section titled “World To Screen”Project a world position to screen coordinates.
static bool SeinWorldToScreen(const UObject* WorldContextObject, APlayerController* PlayerController, FVector WorldPos, FVector2D& OutScreenPos);Screen To World
Section titled “Screen To World”Project a screen position to world space (ray-plane intersection at GroundZ).
static bool SeinScreenToWorld(const UObject* WorldContextObject, APlayerController* PlayerController, FVector2D ScreenPos, float GroundZ, FVector& OutWorldPos);Project Entity To Screen
Section titled “Project Entity To Screen”Gets the screen position above an entity’s actor, raised by the given world offset in centimetres. Returns false if the entity has no actor or the point is behind the camera.
static bool SeinProjectEntityToScreen(const UObject* WorldContextObject, APlayerController* PlayerController, FSeinEntityHandle Handle, float VerticalWorldOffset, FVector2D& OutScreenPos);Is Entity On Screen
Section titled “Is Entity On Screen”True if the entity’s actor is on screen, allowing the margin in pixels around the edges.
Defaults: ScreenMargin = 0.0f.
static bool SeinIsEntityOnScreen(const UObject* WorldContextObject, APlayerController* PlayerController, FSeinEntityHandle Handle, float ScreenMargin = 0.0f);UI / Minimap
World To Minimap
Section titled “World To Minimap”Map a world XY position to minimap UV coordinates (0-1).
static FVector2D SeinWorldToMinimap(FVector WorldPos, FVector2D WorldBoundsMin, FVector2D WorldBoundsMax);Minimap To World
Section titled “Minimap To World”Map minimap UV coordinates (0-1) back to world XY position.
Defaults: GroundZ = 0.0f.
static FVector SeinMinimapToWorld(FVector2D MinimapUV, FVector2D WorldBoundsMin, FVector2D WorldBoundsMax, float GroundZ = 0.0f);Get Camera Frustum Corners
Section titled “Get Camera Frustum Corners”Finds where the camera’s four screen corners land on the ground, in minimap UV coordinates (top-left, top-right, bottom-right, bottom-left). Returns fewer than four points if a corner does not hit the ground, for example near the horizon. A Sein camera uses its live ground height; other pawns use Ground Z.
Defaults: GroundZ = 0.0f.
static TArray<FVector2D> SeinGetCameraFrustumCorners(APlayerController* PlayerController, FVector2D WorldBoundsMin, FVector2D WorldBoundsMax, float GroundZ = 0.0f);Get Minimap Texture For Level
Section titled “Get Minimap Texture For Level”The minimap background for the current level: the override texture set on the level volume if there is one, otherwise the top-down texture baked with the level data. None if neither exists.
static UTexture2D* SeinGetMinimapTextureForLevel(const UObject* WorldContextObject);Get Minimap Rotation Degrees
Section titled “Get Minimap Rotation Degrees”The minimap’s display rotation in degrees. When bRotateWithCamera is true this is -cameraYaw + RotationOffsetDeg (so the camera’s forward points “up”, the map rotating under a fixed arrow); otherwise just RotationOffsetDeg. Apply this as the render-transform angle on the panel that holds the minimap visuals, AND pass it to Minimap Local To World so clicks un-rotate consistently. One source of truth for the rotation.
Defaults: RotationOffsetDeg = 0.0f.
static float SeinGetMinimapRotationDegrees(APlayerController* PlayerController, bool bRotateWithCamera, float RotationOffsetDeg = 0.0f);Minimap Local To World
Section titled “Minimap Local To World”Convert a minimap click (widget-local pixel position on the UN-rotated minimap area) to a world point. Inverts MapRotationDeg, maps to north-up UV, clips to the shape, and projects onto the ground plane at GroundZ.
static bool SeinMinimapLocalToWorld(FVector2D LocalPos, FVector2D WidgetSize, FVector2D WorldBoundsMin, FVector2D WorldBoundsMax, float GroundZ, float MapRotationDeg, bool bCircleClip, FVector& OutWorld);Draw Camera Viewport To Render Target
Section titled “Draw Camera Viewport To Render Target”Draw the camera’s true ground-plane view footprint (a trapezoid — it widens/shrinks faithfully with camera tilt, since it’s the deprojection of the four screen corners onto the ground) into a render target, in NORTH-UP minimap space. Show the render target on an Image inside the SAME rotated panel as the rest of the minimap visuals, so it ends up upright and aligned with the blips. Call this each frame from the minimap widget’s tick — only a widget that actually shows a minimap pays for it. Clears the target each call. No-op if fewer than 4 corners hit the ground (camera at the horizon).
Defaults: LineThickness = 2.0f.
static void SeinDrawCameraViewportToRenderTarget(const UObject* WorldContextObject, APlayerController* PlayerController, UTextureRenderTarget2D* RenderTarget, FVector2D WorldBoundsMin, FVector2D WorldBoundsMax, float GroundZ, FLinearColor LineColor, float LineThickness = 2.0f);Set Image Brush Resource
Section titled “Set Image Brush Resource”Set an Image widget’s brush resource to any texture-like UObject. Works for a UTexture2D (background / fog) AND a UTextureRenderTarget2D (the viewport-box RT) — the stock “Set Brush from Texture” node only accepts Texture2D and rejects render targets. Preserves the Image’s other brush settings (tint, draw-as, size).
static void SeinSetImageBrushResource(UImage* Image, UObject* ResourceObject);UI / Action
Build Ability Slot Data
Section titled “Build Ability Slot Data”Builds the action slot data for one ability on an entity. State is Active, On Cooldown or Available; Empty if the entity or ability is missing. Disabled and Unaffordable are never set here, so apply them yourself from the ability info. Tooltip and Hotkey Label are left empty.
static FSeinActionSlotData SeinBuildAbilitySlotData(const UObject* WorldContextObject, FSeinEntityHandle Entity, FGameplayTag AbilityTag, int32 SlotIndex);Build All Ability Slot Data
Section titled “Build All Ability Slot Data”Builds action slot data for every non-passive ability on an entity, numbered from 0 in order.
static TArray<FSeinActionSlotData> SeinBuildAllAbilitySlotData(const UObject* WorldContextObject, FSeinEntityHandle Entity);