/Engine/Source/Editor/GameProjectGeneration/Public/GameProjectUtils.h
Update the list of plugin directories to scan This will take care of checking out and saving the updated .uproject file automatically
Whether the plugin directory list was changed
static bool UpdateAdditionalPluginDirectory ( const [FString](API\Runtime\Core\Containers\FString) & InDir, const bool bAddOrRemove )