Ill try to make this quick. I am learning C++ and Unreal engine, and I am trying to transform this group of nodes into a single c++ function :
Here is the function I’m working on :
void AR_ChunkManager::UpdateEveryChunk(FIntPoint PlayerPos, TArray<AR_Chunk*>& ObjectArray, TArray<FIntPoint>& PosArray,
TArray<FR_ChunkValues>& ValuesArray, FR_MeshValues& MeshValues, TArray<FR_LODValues>& LODArray,
FR_NoiseMap& NoiseMap, TArray<FR_LODInfo> LOD)
{
int32 i = 0;
for (AR_Chunk* Chunk : ObjectArray)
{
FR_UpdatedValues UpdatedValues = FindUpdatedValues(PlayerPos, PosArray[i], LOD);
Chunk->UpdateChunk(ValuesArray[i], MeshValues, LODArray[i], NoiseMap, UpdatedValues, true);
i++;
}
}
This is the function I want to call (in R_Chunk.h):
UFUNCTION(BlueprintCallable)
void UpdateChunk(UPARAM(ref) FR_ChunkValues &ChunkValues, UPARAM(ref) FR_MeshValues& MeshValues,
UPARAM(ref) FR_LODValues& LODValues, UPARAM(ref) FR_NoiseMap& NoiseMap,UPARAM(ref) FR_UpdatedValues& UpdatedValues, bool print);
Its giving me the error that the member in inaccessible, although it works fine in blueprints. Thank you!