FEditorCommandLineUtils::ParseGameProjectPath

Generally, users supply the project path/name as the second argument of the editor command-line, but in some cases (like for the -diff command), we can infer the project from elements elsewhere in the command-line...

Windows
MacOS
Linux

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/EditorCommandLineUtils.h

Include

#include "EditorCommandLineUtils.h"

Source

/Engine/Source/Editor/UnrealEd/Private/EditorCommandLineUtils.cpp

Syntax

static bool ParseGameProjectPath
(
    const TCHAR * EditorCmdLine,
    FString & ProjPathOut,
    FString & GameNameOut
)

Remarks

Generally, users supply the project path/name as the second argument of the editor command-line, but in some cases (like for the -diff command), we can infer the project from elements elsewhere in the command-line... This function serves as a fallback for determining the launching project path, and does special processing based off of commands that are found in the command-line.

Returns

True if the command-line contained enough info to pull a .uproject file from.

Parameters

Parameter

Description

EditorCmdLine

The string to parse a project path from.

ProjPathOut

[out] Will be filled out with a full .uproject file path (if one was successfully parsed out) from the command-line.

GameNameOut

[out] Will be filled out with a game name (if a project path was successfully parsed out) from the command-line.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss