Use Chooser Plugin in C++

Hi,

I don’t know what is the behavior you are looking for, so from what I’ve understood from your code I can say you have done most of the work, so:

  1. To create your FInstancedStruct use UChooserFunctionLibrary:
FInstancedStruct InstancedStruct = UChooserFunctionLibrary::MakeEvaluateChooser(ChooserTable);
  1. To add input (entry) to your FChooserEvaluationContext use UChooserFunctionLibrary or its functions:
FChooserEvaluationContext EvaluationContext;

// Object
UChooserFunctionLibrary::AddChooserObjectInput(EvaluationContext, Object);
EvaluationContext.AddObjectParam(Object);
// Struct
UChooserFunctionLibrary::AddChooserStructInput(EvaluationContext, Struct);
EvaluationContext.AddStructParam(Struct)	
  1. To get your out struct you can use the function below, since its params are references:
UChooserFunctionLibrary::GetChooserStructOutput(params)
  1. After that you can proceed with UChooserFunctionLibrary::EvaluateChooserMult(params);

If I can give you a suggest, simple create a function that do all the work, and also return what you expect.

May that help you.

Bye