Hi !
I’m new to C++ and I’ve a problem. I’m trying to call a function from a const UActorComponent* but I’ve an error that I don’t understand : Cannot convert “this” argument from type “const UGizmoShape” to type “UGizmoShape”; function is missing const qualifier. Can anyone help me to understand it please?
Here’s the code :
void Visualizer::DrawVisualization(const UActorComponent* Component, const FSceneView* View, FPrimitiveDrawInterface* PDI)
{
const UGizmoShape* gizmoShape = Cast<UGizmoShape>(Component);
gizmoShape->DrawGizmo(PDI);
}