Navigation
API > API/Editor > API/Editor/GameProjectGeneration
| Name | GameProjectUtils |
| Type | class |
| Header File | /Engine/Source/Editor/GameProjectGeneration/Public/GameProjectUtils.h |
| Include Path | #include "GameProjectUtils.h" |
Syntax
class GameProjectUtils
Enums
Public
| Name | Remarks |
|---|---|
| EAddCodeToProjectResult | Used as a function return result when adding new code to the project |
| EClassLocation | Where is this class located within the Source folder? |
| EProjectDuplicateResult | Used as a function return result when a project is duplicated when upgrading project's version in Convert project dialog - Open a copy |
| EReloadStatus | Reload status when adding new code to the project |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FDoesClassNeedAPIExportCallback | TBaseDelegate_OneParam< bool, const FString & > | Internal handler for IsValidBaseClassForCreation | GameProjectUtils.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| bUseAudioMixerForAllPlatforms | bool | Whether we should use AudioMixer for all platforms: | GameProjectUtils.h |
| IncludePathFormatString | const TCHAR | GameProjectUtils.h | |
| UpdateGameProjectNotification | TWeakPtr< SNotificationItem > | GameProjectUtils.h | |
| WarningProjectNameNotification | TWeakPtr< SNotificationItem > | GameProjectUtils.h |
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static EAddCodeToProjectResult AddCodeToProject
(
const FString& NewClassName, |
Adds new source code to the project. | GameProjectUtils.h | |
static EAddCodeToProjectResult AddCodeToProject
(
const FString& NewClassName, |
Adds new source code to the project. | GameProjectUtils.h | |
static EAddCodeToProjectResult AddCodeToProject_Internal
(
const FString& NewClassName, |
Internal handler for AddCodeToProject | GameProjectUtils.h | |
static void AddHardwareConfigValues
(
const FProjectInformation& InProjectInfo, |
Add hardware-specific config values such as the target platform and RHI. | GameProjectUtils.h | |
static bool AddSharedContentToProject
(
const FProjectInformation& InProjectInfo, |
Insert the addition files from any feature packs specified in the temapalte defs file | GameProjectUtils.h | |
static bool AnyProjectFilesExistInFolder
(
const FString& Path |
Returns true if any project files exist in the given folder | GameProjectUtils.h | |
static bool BuildCodeProject
(
const FString& ProjectFilename |
Compiles a project while showing a progress bar, and offers to open the IDE if it fails. | GameProjectUtils.h | |
static bool CalculateSourcePaths
(
const FString& InPath, |
Given the path provided, work out where generated .h and .cpp files would be placed | GameProjectUtils.h | |
static void CheckAndWarnProjectFilenameValid() |
Warn the user if the project filename is invalid in case they renamed it outside the editor | GameProjectUtils.h | |
static void CheckForOutOfDateGameProjectFile() |
Prompts the user to update their project file, if necessary. | GameProjectUtils.h | |
static bool CheckoutGameProjectFile
(
const FString& ProjectFilename, |
Checks the specified game project file out from source control | GameProjectUtils.h | |
static bool CleanupIsEnabled() |
Returns true if file cleanup on failure is enabled, false if not | GameProjectUtils.h | |
static void ClearSupportedTargetPlatforms() |
Clear the list of supported target platforms | GameProjectUtils.h | |
static bool CreateProject
(
const FProjectInformation& InProjectInfo, |
Creates the specified project file and all required folders. | GameProjectUtils.h | |
| Generates a new project using a template project | GameProjectUtils.h | ||
static void DeleteCreatedFiles
(
const FString& RootFolder, |
Deletes the specified list of files that were created during file creation | GameProjectUtils.h | |
static FString DetermineModuleIncludePath
(
const FModuleContextInfo& ModuleInfo, |
Returns the path to the module's include header | GameProjectUtils.h | |
static EProjectDuplicateResult DuplicateProjectForUpgrade
(
const FString& InProjectFile, |
Creates a copy of a project directory in order to upgrade it. | GameProjectUtils.h | |
static bool FindSourceFileInProject
(
const FString& InFilename, |
Given a source file name, find its location within the project | GameProjectUtils.h | |
static bool GenerateBasicSourceCode
(
TArray< FString >& OutCreatedFiles, |
Creates the basic source code for a new project. On failure, OutFailReason will be populated. | GameProjectUtils.h | |
static bool GenerateBasicSourceCode
(
const FString& NewProjectSourcePath, |
Creates the basic source code for a new project. On failure, OutFailReason will be populated. | GameProjectUtils.h | |
static bool GenerateClassCPPFile
(
const FString& NewCPPFileName, |
Generates a cpp file for a UObject class | GameProjectUtils.h | |
static bool GenerateClassHeaderFile
(
const FString& NewHeaderFileName, |
Generates a header file for a UObject class. | GameProjectUtils.h | |
static bool GenerateCodeProjectFiles
(
const FString& ProjectFilename, |
Creates code project files for a new game project. | GameProjectUtils.h | |
| Creates the batch file to regenerate code projects. | GameProjectUtils.h | ||
static bool GenerateConfigFiles
(
const FProjectInformation& InProjectInfo, |
Creates ini files for a new project. On failure, OutFailReason will be populated. | GameProjectUtils.h | |
| Generates a Build.cs file for a Editor module | GameProjectUtils.h | ||
| Generates a Target.cs file for a Editor module | GameProjectUtils.h | ||
static bool GenerateGameFrameworkSourceCode
(
const FString& NewProjectSourcePath, |
Creates the game framework source code for a new project (Pawn, GameMode, PlayerControlleR). | GameProjectUtils.h | |
| Generates a Build.cs file for a game module | GameProjectUtils.h | ||
static bool GenerateGameModuleCPPFile
(
const FString& NewGameModuleCPPFileName, |
Generates a main game module cpp file | GameProjectUtils.h | |
| Generates a main game module header file | GameProjectUtils.h | ||
| Generates a Target.cs file for a game module | GameProjectUtils.h | ||
| Creates the batch file for launching the editor or game | GameProjectUtils.h | ||
static bool GeneratePlatformConfigFiles
(
const FProjectInformation& InProjectInfo, |
Creates new ini files for a specific project's platform configurations. | GameProjectUtils.h | |
static bool GeneratePluginModuleBuildFile
(
const FString& NewBuildFileName, |
Generates a Build.cs file for a plugin module. | GameProjectUtils.h | |
static bool GeneratePluginModuleCPPFile
(
const FString& CPPFileName, |
Generates a module .cpp file, intended for plugin use | GameProjectUtils.h | |
| Generates a module .h file, intended for plugin use | GameProjectUtils.h | ||
static TOptional< FGuid > GenerateProjectFromScratch
(
const FProjectInformation& InProjectInfo, |
Generates a new project without using a template project | GameProjectUtils.h | |
static bool GetClassLocation
(
const FString& InPath, |
Given the path provided, work out where it's located within the Source folder | GameProjectUtils.h | |
static const TArray< FModuleContextInfo > & GetCurrentProjectModules() |
Get the information about any modules referenced in the .uproject file of the currently loaded project | GameProjectUtils.h | |
static TArray< FModuleContextInfo > GetCurrentProjectPluginModules() |
Get the information about any modules in any of the plugins in the currently loaded project (Ignores Engine Plugins) | GameProjectUtils.h | |
static const TCHAR * GetDefaultBuildSettingsVersion() |
Gets the default build settings version for UBT | GameProjectUtils.h | |
static FString GetDefaultProjectTemplateFilename() |
Returns the uproject template filename for the default project template. | GameProjectUtils.h | |
static FString GetIncludePathForFile
(
const FString& InFullFilePath, |
Returns the include header path for a given fully specified, normalized file path | GameProjectUtils.h | |
static int32 GetProjectCodeFileCount() |
GameProjectUtils.h | ||
static void GetProjectCodeFilenames
(
TArray< FString >& OutProjectCodeFilenames |
GameProjectUtils.h | ||
static void GetProjectSourceDirectoryInfo
(
int32& OutNumFiles, |
Retrieves file and size info about the project's source directory | GameProjectUtils.h | |
static TArray< FString > GetRequiredAdditionalDependencies
(
const FNewClassInfo& ClassInfo |
Gets required additional dependencies for fresh project for given class info. | GameProjectUtils.h | |
static FString GetStarterContentName
(
const FProjectInformation& InProjectInfo |
Get the name of the starter content pack to use for the given project. | GameProjectUtils.h | |
static FString GetTemplateDefsFilename() |
Returns the template defs ini filename | GameProjectUtils.h | |
static void HarvestCursorSyncLocation
(
FString& FinalOutput, |
Finds the cursor sync location in the source file and reports it back as a string | GameProjectUtils.h | |
static bool InsertFeaturePacksIntoINIFile
(
const FProjectInformation& InProjectInfo, |
Insert any required feature packs into the DefaultGame.ini file | GameProjectUtils.h | |
static bool IsEngineStarterContentAvailable() |
Returns true if there are engine starter content files available for instancing into new projects. | GameProjectUtils.h | |
static bool IsStarterContentAvailableForProject
(
const FProjectInformation& ProjectInfo |
Returns true if there are any starter content packs are available for given project. | GameProjectUtils.h | |
static bool IsUsingEngineStarterContent
(
const FProjectInformation& ProjectInfo |
Returns true if the given project is referencing engine starter content pack. | GameProjectUtils.h | |
static bool IsValidBaseClassForCreation
(
const UClass* InClass, |
Returns true if the specified class is a valid base class for the given module | GameProjectUtils.h | |
static bool IsValidBaseClassForCreation
(
const UClass* InClass, |
Returns true if the specified class is a valid base class for any of the given modules | GameProjectUtils.h | |
static bool IsValidBaseClassForCreation_Internal
(
const UClass* InClass, |
GameProjectUtils.h | ||
static bool IsValidClassNameForCreation
(
const FString& NewClassName, |
Returns true if the specified class name is properly formed and does not conflict with another class | GameProjectUtils.h | |
static bool IsValidClassNameForCreation
(
const FString& NewClassName, |
Returns true if the specified class name is properly formed and does not conflict with another class, including source/header files | GameProjectUtils.h | |
static bool IsValidProjectFileForCreation
(
const FString& ProjectFile, |
Returns true if the project filename is properly formed and does not conflict with another project | GameProjectUtils.h | |
static bool IsValidSourcePath
(
const FString& InPath, |
Check to see if the given path is a valid place to put source code for this project (exists within the source root path) | GameProjectUtils.h | |
static UTemplateCategories * LoadTemplateCategories
(
const FString& RootDir |
Loads a list of template categories defined in the TemplateCategories.ini file in the specified folder | GameProjectUtils.h | |
static UTemplateProjectDefs * LoadTemplateDefs
(
const FString& ProjectDirectory |
Loads a template project definitions object from the TemplateDefs.ini file in the specified project | GameProjectUtils.h | |
static FString MakeCommaDelimitedList
(
const TArray< FString >& InList, |
Returns a comma delimited string comprised of all the elements in InList. | GameProjectUtils.h | |
static FString MakeCopyrightLine() |
Returns the copyright line used at the top of all files | GameProjectUtils.h | |
static FString MakeIncludeList
(
const TArray< FString >& InList |
Returns a list of #include lines formed from InList | GameProjectUtils.h | |
static bool NameContainsOnlyLegalCharacters
(
const FString& TestName, |
Checks the name for illegal characters | GameProjectUtils.h | |
static bool NameMatchesPlatformModuleName
(
const FString& TestName |
Checks the name to see if it matches platform module names | GameProjectUtils.h | |
static void OnUpdateProjectCancel() |
Handler for when the user opts out of a project update | GameProjectUtils.h | |
static void OnUpdateProjectConfirm() |
Handler for when the user confirms a project update | GameProjectUtils.h | |
static void OnWarningReasonOk() |
Handler for the user confirming they've read the name legnth warning | GameProjectUtils.h | |
static void OpenAddToProjectDialog
(
const FAddToProjectConfig& Config, |
Opens a dialog to add code files or blueprints to the current project. | GameProjectUtils.h | |
static bool OpenCodeIDE
(
const FString& ProjectFile, |
Opens the code editing IDE for the specified project, if it exists. | GameProjectUtils.h | |
static bool OpenProject
(
const FString& ProjectFile, |
Opens the specified project, if it exists. | GameProjectUtils.h | |
static bool ProjectFileExists
(
const FString& ProjectFile |
Returns true if the project file exists on disk | GameProjectUtils.h | |
static bool ProjectHasCodeFiles() |
Returns true if the currently loaded project has code files | GameProjectUtils.h | |
static bool ReadTemplateFile
(
const FString& TemplateFileName, |
Returns the contents of the specified template file | GameProjectUtils.h | |
static FString ReplaceWildcard
(
const FString& Input, |
Replace a wildcard with another string | GameProjectUtils.h | |
static void ResetCurrentProjectModulesCache() |
Reset the cached result of information about any modules referenced in the .uproject file of the currently loaded project | GameProjectUtils.h | |
static bool SetEngineAssociationForForeignProject
(
const FString& ProjectFileName, |
Sets the engine association for a new project. Handles foreign and non-foreign projects. | GameProjectUtils.h | |
static void TryMakeProjectFileWriteable
(
const FString& ProjectFile |
Checks out the current project file (or prompts to make writable) | GameProjectUtils.h | |
static bool UpdateAdditionalPluginDirectory
(
const FString& InDir, |
Update the list of plugin directories to scan This will take care of checking out and saving the updated .uproject file automatically | GameProjectUtils.h | |
static bool UpdateGameProject
(
const FString& ProjectFile, |
Updates the given project file to an engine identifier. | GameProjectUtils.h | |
static bool UpdateGameProjectFile
(
const FString& ProjectFilename, |
Updates the loaded game project file to the current version. | GameProjectUtils.h | |
static bool UpdateGameProjectFile
(
const FString& ProjectFilename, |
Updates the loaded game project file to the current version and to use the given modules | GameProjectUtils.h | |
static bool UpdateGameProjectFile
(
const FString& ProjectFilename, |
Updates the loaded game project file to the current version and modifies FProjectDescriptor accordingly to given modifier. | GameProjectUtils.h | |
static bool UpdateGameProjectFile_Impl
(
const FString& ProjectFilename, |
Updates the loaded game project file to the current version and modifies FProjectDescriptor accordingly to given modifier. | GameProjectUtils.h | |
static void UpdateProject
(
const FProjectDescriptorModifier& Modifier |
Updates the projects and modifies FProjectDescriptor accordingly to given modifier. | GameProjectUtils.h | |
static void UpdateProject () |
Updates the project file. | GameProjectUtils.h | |
static void UpdateProject
(
const TArray< FString >* StartupModuleNames |
Updates the projects, and optionally the modules names | GameProjectUtils.h | |
static void UpdateProject_Impl
(
const FProjectDescriptorModifier* Modifier |
Updates the projects and modifies FProjectDescriptor accordingly to given modifier. | GameProjectUtils.h | |
static bool UpdateRequiredAdditionalDependencies
(
FProjectDescriptor& Descriptor, |
Updates additional dependencies in project descriptor. | GameProjectUtils.h | |
static bool UpdateStartupModuleNames
(
FProjectDescriptor& Descriptor, |
Updates startup module names in project descriptor. | GameProjectUtils.h | |
static void UpdateSupportedTargetPlatforms
(
const FName& InPlatformName, |
Update the list of supported target platforms based upon the parameters provided This will take care of checking out and saving the updated .uproject file automatically | GameProjectUtils.h | |
static bool WriteOutputFile
(
const FString& OutputFilename, |
Writes an output file. OutputFilename includes a path | GameProjectUtils.h |