UWCUnlockCustomRequirement is an abstract base class that enables designers to create custom unlock conditions for skill trees, branches, and nodes. It provides a flexible framework for implementing arbitrary boolean logic that determines whether game content should be available to players.
classDiagram
class UObject
class UWCUnlockCustomRequirement {
<<Abstract>>
+FText RequirementName
+CheckRequirement(Context) bool
+CheckAllRequirements(Requirements, Context)$ bool
+CheckAnyRequirement(Requirements, Context)$ bool
+CheckRequirementClass(Class, Context)$ bool
+CheckAllRequirementClasses(Classes, Context)$ bool
+CheckAnyRequirementClass(Classes, Context)$ bool
}
class FWCUnlockRequirementContext {
<<Struct>>
+AActor OwningActor
+UAbilitySystemComponent ASC
+FGameplayTag TreeID
+FGameplayTag BranchID
+FGameplayTag NodeID
}
UObject <|-- UWCUnlockCustomRequirement
UWCUnlockCustomRequirement ..> FWCUnlockRequirementContext : uses
style UWCUnlockCustomRequirement fill:#7b68ee,stroke:#6a5acd,color:#fff
style FWCUnlockRequirementContext fill:#41a161,stroke:#228b22,color:#fff
Best for configurable requirements where each usage needs different parameter values.
| Aspect | Details |
|---|---|
| Storage | Add instances to arrays with Instanced property specifier |
| Configuration | Each instance has unique, editable variable values |
| Memory | Slightly heavier (one UObject per instance) |
| Use Case | "Quest Complete" with configurable QuestID per skill node |
Best for shared, parameterless requirements that behave identically everywhere.
| Aspect | Details |
|---|---|
| Storage | Reference via TSubclassOf<UWCUnlockCustomRequirement> |
| Configuration | All uses share CDO values (no per-instance config) |
| Memory | Lighter weight (single CDO shared) |
| Use Case | "Is In Combat" check that needs no parameters |
Provides all relevant data for evaluating unlock conditions.
| Property | Type | Description |
|---|---|---|
OwningActor |
AActor* |
The actor being checked (typically player character). May be null. |
AbilitySystemComponent |
UAbilitySystemComponent* |
The ASC of the owning actor. May be null. |
TreeID |
FGameplayTag |
The skill tree being evaluated (if applicable). |
BranchID |
FGameplayTag |
The branch being evaluated (if applicable). |
NodeID |
FGameplayTag |
The node being evaluated (if applicable). |
| Property | Type | Description |
|---|---|---|
RequirementName |
FText |
Display name shown in editor. Set per-instance or override in child classes. |