|
Weaponry Assembly System
WAS
|
#include <WeaponAsset.h>
Inheritance diagram for UWeaponAsset:
Collaboration diagram for UWeaponAsset:Public Member Functions | |
| UWeaponAsset (const FObjectInitializer &Initializer) | |
| void | ClearCache () const |
| void | ClearContext () const |
| UWeaponAssetCharacteristics * | CreateCharacteristics (UObject *Outer, FName Name=NAME_None) const |
| template<typename T > | |
| T * | CreateCharacteristics (UObject *Outer, FName Name=NAME_None) const |
| template<typename T > | |
| T * | CreateCharacteristicsChecked (UObject *Outer, FName Name=NAME_None) const |
| UWeaponAssetCharacteristics * | CreateTransientCharacteristics (UObject *Outer, const FWeaponModifications &InitialMods, FName Name=NAME_None) const |
| template<typename T > | |
| T * | CreateTransientCharacteristics (UObject *Outer, const FWeaponModifications &InitialMods, FName Name=NAME_None) const |
| template<typename T > | |
| T * | CreateTransientCharacteristicsChecked (UObject *Outer, const FWeaponModifications &InitialMods, FName Name=NAME_None) const |
| void | EnsureHasCharacteristics () |
| template<typename T > requires std::is_base_of_v<UWeaponRuntimeNode, T> | |
| void | ExecuteFunctionOnNodes (const TArray< T * > &Nodes, const TFunction< void(UWeaponRuntimeNode *)> &InFunct, const TFunction< bool(const UWeaponRuntimeNode *)> &Condition=[](auto){return true;}) const |
| Executes a function on nodes of a specific type with optional condition. | |
| const TArray< UWeaponRuntimeNode * > & | GetAllNodes () const |
| const FModificationArchitecture & | GetArchitecture () const |
| UWeaponArchitecture * | GetArchitecturePtr () const |
| decltype(auto) | GetCharacteristics () |
| decltype(auto) | GetCharacteristics () const |
| Checks if a modification is applied at the specified slot (template version). | |
| UClass * | GetCharacteristicsClass () const |
| UWeaponRuntimeGraph * | GetGraph () const |
| FORCEINLINE FWeaponModifications & | GetModConfig () |
| FORCEINLINE const FWeaponModifications & | GetModConfig () const |
| FORCEINLINE FWeaponModifications & | GetModificationsApplied () |
| FORCEINLINE const FWeaponModifications & | GetModificationsApplied () const |
| FORCEINLINE void | GetModificationsApplied (FWeaponModifications &Mods) |
| template<typename T > | |
| void | GetNodesByType (TArray< T * > &Arr) const |
| Populates an array with all nodes of the specified type. | |
| bool | HasModAtSlot (FGameplayTag Modification) const |
| bool | IsValidCharacteristics (UWeaponAssetCharacteristics *Other) const |
| TArray< USceneComponent * > | RunBuildNodes (const FWeaponExecutionContext &InContext, bool bCleanRun=true) const |
| Builds visual components by running build nodes in the graph. | |
| void | RunEndNodes (const FWeaponExecutionContext &InContext) const |
| void | RunOperationNodes (const FWeaponExecutionContext &InContext) const |
| bool | SetAllModifications (const FWeaponModifications &InModifications) |
| Applies all modifications at once, filling missing slots with 0. | |
| void | SetGraph (UWeaponRuntimeGraph *InGraph) |
| bool | SetSingleModification (FGameplayTag Modification) |
| Changes the modifier at the specified slot and triggers update. | |
Static Public Member Functions | |
| template<typename T > requires std::is_base_of_v<UWeaponAsset, T> | |
| static T * | CreateWeaponInstance (T *Parent, UObject *Outer) |
| Creates an instanced copy of a weapon asset. | |
Public Attributes | |
| FWeaponExecutionContext | DefaultExecutionContext |
| UWeaponRuntimeGraph * | Graph {nullptr} |
Friends | |
| class | UWeaponAssetLibrary |
Delegate to notify when the weapon asset is modified UWeaponAsset represents a weapon with runtime graph execution, modification slots, and characteristics.
| UWeaponAsset::UWeaponAsset | ( | const FObjectInitializer & | Initializer | ) |
| void UWeaponAsset::ClearCache | ( | ) | const |
| void UWeaponAsset::ClearContext | ( | ) | const |
| UWeaponAssetCharacteristics * UWeaponAsset::CreateCharacteristics | ( | UObject * | Outer, |
| FName | Name = NAME_None ) const |
| T * UWeaponAsset::CreateCharacteristics | ( | UObject * | Outer, |
| FName | Name = NAME_None ) const |
| T * UWeaponAsset::CreateCharacteristicsChecked | ( | UObject * | Outer, |
| FName | Name = NAME_None ) const |
| UWeaponAssetCharacteristics * UWeaponAsset::CreateTransientCharacteristics | ( | UObject * | Outer, |
| const FWeaponModifications & | InitialMods, | ||
| FName | Name = NAME_None ) const |
| T * UWeaponAsset::CreateTransientCharacteristics | ( | UObject * | Outer, |
| const FWeaponModifications & | InitialMods, | ||
| FName | Name = NAME_None ) const |
| T * UWeaponAsset::CreateTransientCharacteristicsChecked | ( | UObject * | Outer, |
| const FWeaponModifications & | InitialMods, | ||
| FName | Name = NAME_None ) const |
|
inlinestatic |
Creates an instanced copy of a weapon asset.
| T | Weapon asset subclass type. |
| Parent | The parent asset to instantiate from. |
| Outer | The owner object for the instance. |
| void UWeaponAsset::EnsureHasCharacteristics | ( | ) |
|
inline |
Executes a function on nodes of a specific type with optional condition.
| T | The node type to process. |
| Nodes | Array of nodes to process. |
| InFunct | Function to execute on matching nodes. |
| Condition | Optional predicate to filter nodes; defaults to accepting all. |
| const TArray< UWeaponRuntimeNode * > & UWeaponAsset::GetAllNodes | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
Checks if a modification is applied at the specified slot (template version).
| SlotEnum | Enum or integral type for the slot index. |
| ModificationEnum | Enum or integral type for the modification value. |
| UClass * UWeaponAsset::GetCharacteristicsClass | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Populates an array with all nodes of the specified type.
| T | The node type to search for. |
| Arr | Output array of matching nodes. |
| bool UWeaponAsset::HasModAtSlot | ( | FGameplayTag | Modification | ) | const |
| bool UWeaponAsset::IsValidCharacteristics | ( | UWeaponAssetCharacteristics * | Other | ) | const |
| TArray< USceneComponent * > UWeaponAsset::RunBuildNodes | ( | const FWeaponExecutionContext & | InContext, |
| bool | bCleanRun = true ) const |
Builds visual components by running build nodes in the graph.
| InContext | Execution context for the graph. |
| bCleanRun | If true, clears the cache before execution. |
| void UWeaponAsset::RunEndNodes | ( | const FWeaponExecutionContext & | InContext | ) | const |
| void UWeaponAsset::RunOperationNodes | ( | const FWeaponExecutionContext & | InContext | ) | const |
| bool UWeaponAsset::SetAllModifications | ( | const FWeaponModifications & | InModifications | ) |
Applies all modifications at once, filling missing slots with 0.
| InModifications | Array of modification values. |
| void UWeaponAsset::SetGraph | ( | UWeaponRuntimeGraph * | InGraph | ) |
| bool UWeaponAsset::SetSingleModification | ( | FGameplayTag | Modification | ) |
Changes the modifier at the specified slot and triggers update.
| Slot | Index of the modification slot. |
| Modification | New modification value. |
|
friend |
| FWeaponExecutionContext UWeaponAsset::DefaultExecutionContext |
| UWeaponRuntimeGraph* UWeaponAsset::Graph {nullptr} |