In the unreal console, we can see many parameters which begin with “r.”. Now I want to make a custom console parameter, and I will use it in the program. How can I do it?
And a very important thing is, that I also want the parameter can be indexed by “r.”. Thanks!
I’ve solved the problem. And the code is as follows:
IConsoleVariable* ConsoleVarGuideAudioFF = IConsoleManager::Get().FindConsoleVariable(TEXT("w.GuideAudioFF"));
if (!ConsoleVarGuideAudioFF)
{
IConsoleManager::Get().RegisterConsoleVariable(TEXT("w.GuideAudioFF"),
1.0f,
TEXT("Defines the rate of fasting forward(FF) when the Guide is playing audio.\n")
TEXT("And its priority is higher than that of w.SequencePlayRate.\n"),
ECVF_Scalability | ECVF_RenderThreadSafe);
ConsoleVarGuideAudioFF = IConsoleManager::Get().FindConsoleVariable(TEXT("w.GuideAudioFF"));
}