InEditorGameURLOptions
InEditorGameURLOptions
#Overview
name: InEditorGameURLOptions
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of InEditorGameURLOptions is to provide additional options for the game URL when launching a play session from within the Unreal Editor. This setting variable is primarily used in the context of testing and debugging game scenarios directly from the editor environment.
InEditorGameURLOptions is part of the UnrealEd module, which is a core component of the Unreal Engine editor system. It is specifically used by the UEditorEngine class, which manages editor-specific functionality.
The value of this variable is set in the configuration (.ini) file, as indicated by the ‘config’ specifier in the UPROPERTY macro. It can be edited through the editor’s project settings interface.
This variable interacts with other URL-related parameters, particularly in the BuildPlayWorldURL function. It is combined with other URL options to create the final URL for launching the play session.
Developers should be aware that:
- The format of InEditorGameURLOptions should be “?option1=X?option2?option3=Y”.
- These options are applied to all play sessions launched from the editor for the specific game project.
- The options set here are global and will affect all users of the project.
Best practices when using this variable include:
- Use it for options that should consistently apply to all play-from-editor sessions.
- Document any custom options added to ensure other team members understand their purpose.
- Be cautious when modifying this variable, as it can affect the behavior of play sessions for all developers working on the project.
- For temporary or user-specific options, consider using the AdditionalURLOptions parameter in BuildPlayWorldURL instead.
- Regularly review and clean up unused options to maintain clarity and prevent potential conflicts.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEngine.ini:1835, section: [/Script/UnrealEd.EditorEngine]
- INI Section:
/Script/UnrealEd.EditorEngine
- Raw value: ``
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Editor/EditorEngine.h:402
Scope (from outer to inner):
file
class class UEditorEngine : public UEngine
Source code excerpt:
/** Additional per-user/per-game options set in the .ini file. Should be in the form "?option1=X?option2?option3=Y" */
UPROPERTY(EditAnywhere, config, Category=Advanced)
FString InEditorGameURLOptions;
/** A pointer to a UWorld that is the duplicated/saved-loaded to be played in with "Play From Here" */
UPROPERTY()
TObjectPtr<class UWorld> PlayWorld;
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Editor/EditorEngine.h:1735
Scope (from outer to inner):
file
class class UEditorEngine : public UEngine
Source code excerpt:
* @param MapName The name of the map to put into the URL
* @param bSpecatorMode If true, the player starts in spectator mode
* @param AdditionalURLOptions Additional URL Options to append (e.g, ?OptionX?OptionY). This is in addition to InEditorGameURLOptions.
*
* @return The URL for the game
*/
UNREALED_API virtual FString BuildPlayWorldURL(const TCHAR* MapName, bool bSpectatorMode = false, FString AdditionalURLOptions=FString());
/**
* Kills the Play From Here session
*/
UNREALED_API virtual void EndPlayMap();
/**
* Destroy the current play session and perform miscellaneous cleanup
*/
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/PlayLevel.cpp:1392
Scope (from outer to inner):
file
function FString UEditorEngine::BuildPlayWorldURL
Source code excerpt:
// Add any game-specific options set in the INI file
URL += InEditorGameURLOptions;
// Add any additional options that were specified for this call
URL += AdditionalURLOptions;
return URL;
}