Basic
How work the Group Param Handler on Specie
It's this system which manage all stuff from creation data
This mean you can add your own stuff thanks to this
I'll use PHD for ParamHandlerDataAsset
GPHD for GroupParamHandlerDataAsset
PH for ParamHandler
Group Param Handler Content
A GPH DataAsset (GPHD) is a container that holds a list of Param Handler Descriptors (PHDs).
This structure is used to organize and manage parameter handling by category.
Example: EpicHmn
In this example, we can see parameters grouped by logical areas:
- Head Creation Data
- Hair Creation Data
- Body Creation Data
Inspecting a PHD
If we open the Head PHD, we see:
It contains a list of keys (parameter names) associated with handler classes.
For instance, whenever the HeadStyle
parameter changes, the system will call the handler object BP_ACC_PH_HeadStyle
.
Inspecting a Param Handler (PH) Object
Each Param Handler class defines 4 event methods that are called when a data value changes:
OnReceiveInt
OnReceiveFloat
OnReceiveColor
OnReceiveTag
These functions allow you to implement logic specific to the type of parameter being received.
BP Version (deprecated)
In the BP_ACC_PH_HeadStyle we can see i do stuff when i receive Int Value from HeadStyle key :
The default Blueprint version of the ParamHandler
has been migrated to C++.
It remains available only as a reference to understand the logic, but it is not used in the official template project.
CPP Version (used)
FACCParamHandlerResult UACCParamHandler_HairStyle::OnReceiveInt_Implementation(UACCCreationComponent* CreationComponent, const FACCIntParam& IntParam, bool bRemoved)
{
// Step 1: Use the CustomInfo as the hair part key (e.g., "FrontHair", "BackTailHair")
FName HairPartName = IntParam.CustomInfo;
// Remove Hair ?
if (bRemoved)
{
CreationComponent->RemoveInstance(IntParam.CustomInfo);
UE_LOG(LogACC, Log, TEXT("HairStyle: Removed '%s'"), *HairPartName.ToString());
return FACCParamHandlerResult::MakeSuccess();
}
// Step 2: Retrieve mesh data for the selected hair ID
FACCMeshData MeshData;
if (!CreationComponent->CurrentGender->GetMeshData("Hair", IntParam.Value, MeshData))
{
// Optionally remove the current hair part if invalid data
if (bRemoveHairPartIfInvalid)
{
CreationComponent->RemoveInstance(HairPartName);
UE_LOG(LogACC, Warning, TEXT("HairStyle: Removed invalid hair part '%s'"), *HairPartName.ToString());
}
return FACCParamHandlerResult::MakeError(TEXT("Hair mesh data is missing or invalid for gender '%s'."),
*GetNameSafe(CreationComponent->CurrentGender));
}
...