I’m using UE 4.10. I need to parse command line parameters in c++ when the program start.
Where can I get the argc, argv? Where should I put the c++ code for parsing command line parameters?
Thanks really.
I’m using UE 4.10. I need to parse command line parameters in c++ when the program start.
Where can I get the argc, argv? Where should I put the c++ code for parsing command line parameters?
Thanks really.
I’ll answer it myself, if any one need to know:
FCommandLine::Get();
Thank you very much, it helps
If anyone wants to know how to parse arguments from FCommandLine::Get()
:
FString ParameterValue;
if (FParse::Value(FCommandLine::Get(), TEXT("ParameterName"), ParameterValue))
{
// The parameter "ParameterName" has been set and ParameterValue contains its value
}
Includes:
#include "Misc/Parse.h" // FParse
#include "Misc/CommandLine.h" // FCommandLine