I solved this problem by adding some codes to AkPluginActivatorCommandlet.cpp
int32 UAkPluginActivatorCommandlet::Main(const FString& Params)
{
// @todo: Determine whether files should be written here at all. It is possible to create these files right after successful bank generation.
#if !WITH_EDITOR
return -1;
#else
if (!FApp::HasProjectName())
{
UE_LOG(LogAkPluginActivator, Display, TEXT("Project name could not be determined."));
return 0;
}
const FString TargetName = FApp::GetProjectName(); // Here: Only use the project name ,not concern the target.
FString TargetName = FApp::GetProjectName();
if (Params.StartsWith(TEXT(" Server")))
{
TargetName.Append(TEXT("Server"));
}
else if (Params.StartsWith(TEXT(" Client")))
{
TargetName.Append(TEXT("Client"));
}
if (TargetName.IsEmpty() || TargetName.Compare("UE4Game") == 0 || TargetName.Compare("UE4Editor") == 0)
{
UE_LOG(LogAkPluginActivator, Display, TEXT("No files will be modified when building the UE4 Wwise engine plug-in."));
return 0;
}