When accessing class A from class B, we want to pass the index of class A.
The purpose is to execute a function called LightMeshChange in the end by accessing the server of class B from class A and spraying it with multicast. (LightMeshChanges are declared in Blueprints.)
The function in cpp is like this:
A class
void ~()
{
B->ServerLightChange(playerIndex, effect);
}
B class
void ServerLightChange_Implementation(int32 playerIndex, EEffectType effect)
{
MultiLightChange(playerIndex, effect);
}
void MultiLightChange_Implementation(int32 playerIndex, EEffectType effect)
{
LightMeshChange(playerIndex, effect);
}
The Enum value called effect is delivered properly, but the int value called player Index is not delivered properly. (It continues to be passed as 0 as the initial value.)
I tried directly passing an Int value like void~(int pIndex) in A Class, and changed int to int32 or const int32&, but it keeps coming in as 0.
I don’t even know if it’s an Unreal bug or if the code is wrong… Does anyone have a similar problem?