Sein Entity View Model
Class · USeinEntityViewModel : UObject
#include "ViewModel/SeinEntityViewModel.h"
Generic ViewModel for any sim entity.
Created and cached by USeinUISubsystem. Automatically refreshed each sim tick. Widgets can:
-
Bind to BlueprintReadOnly properties via UMG native binding (auto-updates)
-
Bind to BlueprintCallable getters via UMG binding functions
-
Listen to OnRefreshed for event-driven updates
Functions
Section titled “Functions”UI / Entity
Get Attribute
Section titled “Get Attribute”A scalar field of one of the entity’s components as the simulation reads it, with every effect that modifies it applied: Fixed Point, integer, float, bool (1 or 0) or enum (its value). Field Name takes a field path like a modifier’s, such as Speed or VisionStamps[0].Radius. 0 when it can’t be found.
float GetAttribute(UScriptStruct* ComponentType, FName FieldName) const;Get Base Attribute
Section titled “Get Base Attribute”The same field without the effects that modify it, for displays such as “500 (+150)”.
float GetBaseAttribute(UScriptStruct* ComponentType, FName FieldName) const;Has Component
Section titled “Has Component”Check if the entity has a specific component type.
bool HasComponent(UScriptStruct* ComponentType) const;Get Component Data
Section titled “Get Component Data”Get a full copy of a component’s data as an FInstancedStruct. For advanced Blueprint use where the designer knows the component type. Returns an empty struct if the component is not present.
FInstancedStruct GetComponentData(UScriptStruct* ComponentType) const;Get Tags
Section titled “Get Tags”Get the entity’s current gameplay tags.
FGameplayTagContainer GetTags() const;Get Relation To Player
Section titled “Get Relation To Player”How a specific player sees this entity: friendly, enemy or neutral.
ESeinRelation GetRelationToPlayer(FSeinPlayerID PlayerID) const;Get Relation To Local Player
Section titled “Get Relation To Local Player”How the local player sees this entity: friendly, enemy or neutral.
ESeinRelation GetRelationToLocalPlayer() const;Get Abilities
Section titled “Get Abilities”Info for every ability on this entity. For a group, the group’s abilities and all its members’ are merged by ability tag. Abilities with no tag are left out.
TArray<FSeinAbilityInfo> GetAbilities() const;Get Ability By Tag
Section titled “Get Ability By Tag”Get ability info for a specific ability tag. Returns empty if not found.
FSeinAbilityInfo GetAbilityByTag(FGameplayTag Tag) const;Has Ability With Tag
Section titled “Has Ability With Tag”Check if the entity has an ability with the given tag.
bool HasAbilityWithTag(FGameplayTag Tag) const;Get Production Queue
Section titled “Get Production Queue”The entity’s production queue as UI-ready entries, front first, with icon and display name already resolved. Empty if the entity has no production queue or nothing is queued.
TArray<FSeinProductionQueueItemInfo> GetProductionQueue() const;UI / Ability
Merge Ability Infos
Section titled “Merge Ability Infos”Combines several Ability Info entries for the same ability tag into one. Name, icon, cost, total cooldown and passive flag come from the first entry. Enabled and Active are true if any entry is. On Cooldown is true only if all are. Cooldown Remaining is the shortest, so the display shows when the soonest unit can fire. Disabled Reason is None if any entry is enabled. An empty list returns an empty, invalid info. Do not mix different tags.
static FSeinAbilityInfo MergeAbilityInfos(const TArray<FSeinAbilityInfo>& Inputs);Event dispatchers
Section titled “Event dispatchers”On Refreshed
Section titled “On Refreshed”FOnEntityViewModelRefreshed OnRefreshed
Fired after Refresh() updates cached data. Widgets bind to this for event-driven updates.
On Invalidated
Section titled “On Invalidated”FOnEntityViewModelInvalidated OnInvalidated
Fired when the tracked entity is destroyed. Widgets should unbind and clear references.
Properties
Section titled “Properties”Entity
Section titled “Entity”FSeinEntityHandle Entity
Blueprint read-only
The entity handle this ViewModel tracks.
Display Name
Section titled “Display Name”FText DisplayName
Blueprint read-only
Display name from Identity Data.
Description
Section titled “Description”FText Description
Blueprint read-only
Description from Identity Data.
TObjectPtr<UTexture2D> Icon · default nullptr
Blueprint read-only
Icon texture from Identity Data.
Portrait
Section titled “Portrait”TObjectPtr<UTexture2D> Portrait · default nullptr
Blueprint read-only
Portrait texture from Identity Data.
Identity Tag
Section titled “Identity Tag”FGameplayTag IdentityTag
Blueprint read-only
Identity gameplay tag (from Identity Data).
Owner Player ID
Section titled “Owner Player ID”FSeinPlayerID OwnerPlayerID
Blueprint read-only
Owning player ID.
Is Alive
Section titled “Is Alive”bool bIsAlive · default false
Blueprint read-only
Whether the entity is still alive in the simulation.
C++ members (3)
void Initialize(FSeinEntityHandle InHandle, USeinWorldSubsystem* InWorldSubsystem);Initialize this ViewModel with an entity handle. Called byUSeinUISubsystemwhen creating the ViewModel. Caches identity data fromFSeinIdentityPayload.void Refresh();Refresh cached data from the simulation. Called byUSeinUISubsystemeach sim tick.void Invalidate();Mark this ViewModel as invalidated (entity destroyed). Fires OnInvalidated and clears data.