I am implementing runtime curve based camera parameters, which requires updating camera parameter during runtime. It seems current UCameraVariableAsset, UCameraVariableCollection is not accessible with runtime C++. Multiple field like UCameraVariableAsset::GetDisplayName is marked with WITH_EDITORONLY_DATA so that UCameraVariableCollection::Variables is not intented for querying and searching based on variable name. Is that intented purpose to hide Gameplay Camera parameter from C++? If not, how can I call UBlueprintCameraVariableTableFunctionLibrary::SetFloatCameraVariable or something similar in C++?
This is quite similar to a question I just answered [Content removed] However I will reiterate what is most relevant to your situation.
The Gameplay Cameras System is still experimental and almost definitely subject to change. Parameterization System is still a work in progress and will likely change significantly in 5.8 as the developer plans to make it easier to do some sorts of value processing directly inside camera rigs.
You will likely need to implement some sort of system to store/look up your variables using the UCameraVariableAsset’s Variable ID. You could create a blueprint function in order to pass your FBlueprintCameraEvaluationDataRef & UCameraVariableAsset. Alternatively If you implement your own UCameraDirector, UCameraDirectorEvalutator & FTestCameraDirectorEvaluator you can access the FCameraNodeEvaluationResult when overriding the FCameraDirectorEvaluator::OnRun. Using this you can call the get/setters from the function library or just call the underlying functions yourself.
Thanks for the reply. I have been following Ludovic’s devlog; I understand the GPC is still experimental, but I think it is already in good shape!
I have examined your suggested approach and it is certainly doable. However, maintaining a Data Table to map Variable Names to Variable IDs feels like a bit of a detour to me. Probably my best option is just remove some of these WITH_EDITORONLY_DATA in code so tha I can query UCameraVariableAsset asset from UCameraVariableCollection by name. Maybe I should revisit this topic later in 5.8.