UI Toolkit Nodes¶
RENDER All functions in USeinUIBPFL. These are render-side utilities for building RTS interfaces.
Entity Display Helpers¶
Functions that read archetype data for UI display. These resolve through the actor bridge to the entity's USeinArchetypeDefinition.
SeinGetEntityDisplayName¶
Returns the display name from the entity's archetype definition. Returns empty text if the handle is invalid.
SeinGetEntityIcon¶
Returns the icon texture from the archetype. Used for selection panels, minimap markers, and action bars.
SeinGetEntityPortrait¶
Returns the portrait texture. Typically a larger image than the icon, used in unit info panels.
SeinGetEntityArchetypeTag¶
Returns the archetype's gameplay tag (e.g., Unit.Infantry.Rifleman). Useful for grouping selected units by type.
SeinGetEntityRelation¶
Returns the relationship between an entity and a player: Friendly, Enemy, or Neutral. Compares entity owner against the given player ID.
Conversion Helpers¶
SeinFixedToFloat¶
Converts FFixedPoint to float. Use for any sim value that needs to drive a UMG widget (progress bars, text display, etc.).
SeinFixedVectorToVector¶
Converts FFixedVector to Unreal FVector. Use when projecting sim positions to screen space or placing visual effects.
SeinFormatResourceCost¶
Formats a TMap<FName, float> cost map into a display string. Example output: "300 Manpower, 50 Fuel". Suitable for tooltip text.
Screen Projection¶
SeinWorldToScreen¶
Projects a world position to screen coordinates. Returns false if the position is behind the camera. Wrapper around ProjectWorldLocationToScreen with null safety.
SeinScreenToWorld¶
Deprojects a screen position to a world position on a horizontal plane at the given Z height. Useful for minimap click-to-world and right-click targeting.
SeinProjectEntityToScreen¶
Projects an entity's sim position to screen space, with an optional vertical offset (useful for placing UI above the unit's head). Converts from fixed-point internally.
SeinIsEntityOnScreen¶
Returns true if the entity's projected screen position is within the viewport (with optional margin in pixels). Use to cull off-screen world-space widgets.
Minimap Math¶
SeinWorldToMinimap¶
Converts a world XY position to normalized minimap UV coordinates (0–1 range). WorldBoundsMin/Max define the playable area.
SeinMinimapToWorld¶
Converts minimap UV coordinates back to a world position. Use for minimap click-to-move commands.
SeinGetCameraFrustumCorners¶
SeinGetCameraFrustumCorners(PlayerController, WorldBoundsMin, WorldBoundsMax, GroundZ) → TArray<FVector2D>
Returns the four corners of the camera's viewport frustum projected onto the ground plane, in minimap UV space. Use to draw the camera viewport rectangle on the minimap.
Action Slot Builders¶
These functions produce FSeinActionSlotData structs — everything a UI button needs to display an ability or production item.
FSeinActionSlotData¶
USTRUCT(BlueprintType)
struct FSeinActionSlotData
{
FText Name; // Display name
FText Tooltip; // Tooltip text
UTexture2D* Icon; // Button icon
FGameplayTag ActionTag; // Ability or archetype tag
ESeinActionSlotState State; // Available, OnCooldown, Disabled, etc.
float CooldownPercent; // 0–1 for cooldown sweep overlay
TMap<FName, float> ResourceCost; // Cost display
int32 SlotIndex; // Position in the action bar
FText HotkeyLabel; // Keyboard shortcut text
};
ESeinActionSlotState¶
| Value | Meaning |
|---|---|
Empty |
No ability in this slot |
Available |
Can be activated |
OnCooldown |
Cooling down (show CooldownPercent) |
Disabled |
Cannot be used (prerequisites not met) |
Unaffordable |
Insufficient resources |
Active |
Currently executing |
SeinBuildAbilitySlotData¶
Builds action slot data for a single ability on an entity. Reads the ability's current state (cooldown, active, cost) and packages it for UI display.
SeinBuildAllAbilitySlotData¶
Builds action slot data for all abilities on an entity. Returns an array ordered by ability index. Non-passive abilities only.
SeinBuildProductionSlotData¶
Builds action slot data for all producible items on a building entity. Checks prerequisites, affordability, and queue state per item. Use for building production panels.