CopyrightNotice
CopyrightNotice
#Overview
name: CopyrightNotice
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 16
C++ source files. Also referenced in 2
C# build files meaning it may affect the build system logic.
#Summary
#Usage in the C++ source code
The purpose of CopyrightNotice is to store and manage the copyright information for a project within Unreal Engine 5. This variable is used across various subsystems and modules to include copyright notices in generated files, exported content, and other project-related outputs.
Several Unreal Engine subsystems, plugins, and modules rely on this setting variable:
- GLTF Exporter plugin
- Web API plugin
- Localization system
- Game Project Generation system
- Translation Editor
- Gather Text Commandlet
The value of this variable is typically set in the General Project Settings of an Unreal Engine project. It can be accessed using GetDefault
Other variables that interact with CopyrightNotice include project-specific settings in various plugins and modules, such as WebAPICodeGeneratorSettings.
Developers must be aware that:
- This variable is used in multiple places to generate copyright notices in various file formats and outputs.
- Changing this value will affect all generated files and exported content that include copyright information.
- Some modules may have their own override for the copyright notice, which may take precedence over the general project settings.
Best practices when using this variable include:
- Set a meaningful and legally accurate copyright notice for your project.
- Keep the copyright notice up-to-date, especially when making significant changes to the project or transferring ownership.
- Ensure consistency across all modules and plugins that use this variable.
- Be aware of any module-specific overrides and manage them accordingly.
- When exporting or generating files, verify that the correct copyright notice is being applied, especially in cases where custom generation processes are used.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseGame.ini:75, section: [/Script/EngineSettings.GeneralProjectSettings]
- INI Section:
/Script/EngineSettings.GeneralProjectSettings
- Raw value:
Fill out your copyright notice in the Description page of Project Settings.
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Enterprise/GLTFExporter/Source/GLTFExporter/Private/Builders/GLTFJsonBuilder.cpp:118
Scope (from outer to inner):
file
function FString FGLTFJsonBuilder::GetCopyrightString
Source code excerpt:
FString FGLTFJsonBuilder::GetCopyrightString()
{
return GetDefault<UGeneralProjectSettings>()->CopyrightNotice;
}
#Loc: <Workspace>/Engine/Plugins/Experimental/Web/WebAPI/Source/WebAPIEditor/Private/CodeGen/WebAPICodeGenerator.cpp:49
Scope (from outer to inner):
file
function TSharedPtr<FWebAPICodeGenFile> MakeCodeGenFile
Source code excerpt:
CodeGenFile->FileType = FileType;
CodeGenFile->Namespace = InDefinition->GetGeneratorSettings().GetNamespace();
CodeGenFile->CopyrightNotice = InDefinition->GetCopyrightNotice();
CodeGenFile->IncludePaths.Append(InAdditionalIncludes);
CodeGenFile->AddItem(InCodeGenObject);
return CodeGenFile;
}
#Loc: <Workspace>/Engine/Plugins/Experimental/Web/WebAPI/Source/WebAPIEditor/Private/CodeGen/WebAPICodeGeneratorSettings.cpp:8
Scope (from outer to inner):
file
function FWebAPICodeGeneratorSettings::FWebAPICodeGeneratorSettings
Source code excerpt:
FWebAPICodeGeneratorSettings::FWebAPICodeGeneratorSettings()
{
CopyrightNotice = GetDefault<UGeneralProjectSettings>()->CopyrightNotice;
}
TScriptInterface<IWebAPICodeGeneratorInterface> FWebAPICodeGeneratorSettings::GetGeneratorClass() const
{
if(!CodeGeneratorClass.IsNull() && bOverrideGeneratorClass)
{
#Loc: <Workspace>/Engine/Plugins/Experimental/Web/WebAPI/Source/WebAPIEditor/Private/WebAPIDefinition.cpp:83
Scope (from outer to inner):
file
function FString UWebAPIDefinition::GetCopyrightNotice
Source code excerpt:
FString UWebAPIDefinition::GetCopyrightNotice() const
{
return GeneratorSettings.CopyrightNotice;
}
const FWebAPIProviderSettings& UWebAPIDefinition::GetProviderSettings() const
{
return ProviderSettings;
}
#Loc: <Workspace>/Engine/Plugins/Experimental/Web/WebAPI/Source/WebAPIEditor/Public/CodeGen/Dom/WebAPICodeGenFile.h:31
Scope (from outer to inner):
file
class class FWebAPICodeGenFile : public FWebAPICodeGenBase
Source code excerpt:
/** Copyright notice to apply to the top of the file. Uses the Project setting unless specified. */
FString CopyrightNotice;
/** Module dependencies for this file. */
TSet<FString> Modules;
/** Set of (unique) include paths. */
TSet<FString> IncludePaths;
#Loc: <Workspace>/Engine/Plugins/Experimental/Web/WebAPI/Source/WebAPIEditor/Public/CodeGen/WebAPICodeGeneratorSettings.h:52
Scope: file
Source code excerpt:
/** The copyright notice to apply to generated files. */
UPROPERTY(EditAnywhere, Category = "Generator")
FString CopyrightNotice;
/** The C++ Unreal module determines the location of the generated files. */
UPROPERTY(EditAnywhere, Category = "Generator")
FWebAPIDefinitionTargetModule TargetModule;
/** The relative output path for generated models. This accepts the token "{Model}", where Model is the name of the generated object. */
#Loc: <Workspace>/Engine/Plugins/Experimental/Web/WebAPI/Source/WebAPILiquidJS/Private/WebAPILiquidJSCodeGenerator.cpp:505
Scope (from outer to inner):
file
namespace UE
namespace WebAPI
namespace Generator
namespace LiquidJS
namespace Private
function TSharedPtr<FJsonObject> ToJson
Source code excerpt:
JsonObject->SetStringField(TEXT("namespace"), InCodeGenObject->Namespace);
JsonObject->SetStringField(TEXT("module"), InCodeGenObject->Module);
JsonObject->SetStringField(TEXT("copyrightNotice"), InCodeGenObject->CopyrightNotice);
TArray<TSharedPtr<FJsonValue>> IncludePathJson;
ToJson(InCodeGenObject->IncludePaths, IncludePathJson);
JsonObject->SetArrayField(TEXT("includePaths"), IncludePathJson);
TArray<FString> ForwardDeclarations;
#Loc: <Workspace>/Engine/Source/Developer/Localization/Private/LocTextHelper.cpp:526
Scope (from outer to inner):
file
function void FLocTextHelper::SetCopyrightNotice
Source code excerpt:
void FLocTextHelper::SetCopyrightNotice(const FString& InCopyrightNotice)
{
CopyrightNotice = InCopyrightNotice;
}
const FString& FLocTextHelper::GetCopyrightNotice() const
{
return CopyrightNotice;
}
const FString& FLocTextHelper::GetNativeCulture() const
{
return NativeCulture;
}
#Loc: <Workspace>/Engine/Source/Developer/Localization/Private/PortableObjectFormatDOM.cpp:761
Scope (from outer to inner):
file
function void FPortableObjectFormatDOM::CreateNewHeader
Source code excerpt:
/*
# {ProjectName} {LanguageName} translation
# {CopyrightNotice}
#
msgid ""
msgstr ""
"Project-Id-Version: {ProjectName}\n"
"POT-Creation-Date: 2014-1-31 04:16+0000\n"
"PO-Revision-Date: 2014-1-31 04:16+0000\n"
"Language-Team: \n"
"Language: {LanguageCode}\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
*/
Header.Clear();
Header.SetEntryValue( TEXT("Project-Id-Version"), *GetProjectName() );
// Setup header entries
Header.UpdateTimeStamp();
Header.SetEntryValue( TEXT("Language-Team"), TEXT("") );
#Loc: <Workspace>/Engine/Source/Developer/Localization/Private/UserGeneratedContentLocalization.cpp:261
Scope (from outer to inner):
file
namespace UserGeneratedContentLocalization
function bool ExportLocalization
Source code excerpt:
ConfigSection.Add(TEXT("GatheredSourceBasePath"), FPaths::ConvertRelativePathToFull(Plugin->GetBaseDir()));
ConfigSection.Add(TEXT("CopyrightNotice"), ExportOptions.CopyrightNotice);
ConfigSection.Add(TEXT("NativeCulture"), ExportOptions.UGCLocDescriptor.NativeCulture);
for (const FString& CultureToGenerate : CulturesToGenerate)
{
ConfigSection.Add(TEXT("CulturesToGenerate"), *CultureToGenerate);
}
#Loc: <Workspace>/Engine/Source/Developer/Localization/Public/LocTextHelper.h:976
Scope (from outer to inner):
file
class class FLocTextHelper
Source code excerpt:
/** Optional copyright notice to insert into files that support it */
FString CopyrightNotice;
/** Loaded manifest */
TSharedPtr<FInternationalizationManifest> Manifest;
/** Loaded archives */
TMap<FString, TSharedPtr<FInternationalizationArchive>> Archives;
#Loc: <Workspace>/Engine/Source/Developer/Localization/Public/UserGeneratedContentLocalization.h:145
Scope (from outer to inner):
file
namespace UserGeneratedContentLocalization
Source code excerpt:
/** An optional copyright notice to insert into the exported files */
FString CopyrightNotice;
};
enum class ELoadLocalizationResult : uint8
{
/** There was no source localization data to load */
NoData,
#Loc: <Workspace>/Engine/Source/Editor/GameProjectGeneration/Private/GameProjectUtils.cpp:2995
Scope (from outer to inner):
file
function FString GameProjectUtils::MakeCopyrightLine
Source code excerpt:
FString GameProjectUtils::MakeCopyrightLine()
{
const FString CopyrightNotice = GetDefault<UGeneralProjectSettings>()->CopyrightNotice;
if (!CopyrightNotice.IsEmpty())
{
return FString(TEXT("// ")) + CopyrightNotice;
}
else
{
return FString();
}
}
#Loc: <Workspace>/Engine/Source/Editor/TranslationEditor/Private/TranslationDataManager.cpp:891
Scope (from outer to inner):
file
function bool FTranslationDataManager::SaveSelectedTranslations
Source code excerpt:
PortableObjectDom.SetProjectName(ManifestAndArchiveName);
PortableObjectDom.SetLanguage(CultureName);
PortableObjectDom.CreateNewHeader(GetDefault<UGeneralProjectSettings>()->CopyrightNotice);
PortableObjectPipeline::UpdatePOFileHeaderForSettings(PortableObjectDom, LocalizationTarget->Settings.ExportSettings.CollapseMode, LocalizationTarget->Settings.ExportSettings.POFormat);
TArray<UTranslationUnit*>& TranslationsArray = DataManager->GetAllTranslationsArray();
TSharedPtr<TArray<UTranslationUnit*>> EditedItems = Item.Value;
// For each edited item belonging to this manifest/archive pair
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/GatherTextCommandlet.cpp:196
Scope (from outer to inner):
file
function int32 UGatherTextCommandlet::ProcessGatherConfig
Source code excerpt:
}
FString CopyrightNotice;
if (!GetStringFromConfig(TEXT("CommonSettings"), TEXT("CopyrightNotice"), CopyrightNotice, GatherTextConfigPath))
{
CopyrightNotice = GetDefault<UGeneralProjectSettings>()->CopyrightNotice;
}
// Basic helper that can be used only to gather a new manifest for writing
TSharedRef<FLocTextHelper> CommandletGatherManifestHelper = MakeShared<FLocTextHelper>(LocalizationTargetName, MakeShared<FLocFileSCCNotifies>(CommandletSourceControlInfo), PlatformSplitMode);
CommandletGatherManifestHelper->SetCopyrightNotice(CopyrightNotice);
CommandletGatherManifestHelper->LoadManifest(ELocTextHelperLoadFlags::Create);
const FString GatherTextStepPrefix = TEXT("GatherTextStep");
// Read the list of steps from the config file (they all have the format GatherTextStep{N})
TArray<FString> StepNames;
#Loc: <Workspace>/Engine/Source/Runtime/EngineSettings/Classes/GeneralProjectSettings.h:25
Scope (from outer to inner):
file
class class UGeneralProjectSettings : public UObject
Source code excerpt:
/** The project's copyright and/or trademark notices. */
UPROPERTY(config, EditAnywhere, Category=Legal)
FString CopyrightNotice;
/** The project's description text. */
UPROPERTY(config, EditAnywhere, Category=About)
FString Description;
/** The project's homepage URL. */
#References in C# build files
This variable is referenced in the following C# build files:
Location: <Workspace>/Engine/Source/Programs/AutomationTool/Scripts/CreatePlatformExtension.cs:690
{
string CopyrightNotice = "";
GameIni.GetString("/Script/EngineSettings.GeneralProjectSettings", "CopyrightNotice", out CopyrightNotice);
if (!string.IsNullOrEmpty(CopyrightNotice))
{
return "// " + CopyrightNotice;
}
else
Location: <Workspace>/Engine/Source/Programs/UnrealBuildTool/Platform/Windows/UEBuildWindows.cs:409
/// The project's copyright and/or trademark notices.
/// </summary>
[ConfigFile(ConfigHierarchyType.Game, "/Script/EngineSettings.GeneralProjectSettings", "CopyrightNotice")]
public string? CopyrightNotice;
/// <summary>
/// The product name.
/// </summary>
[ConfigFile(ConfigHierarchyType.Game, "/Script/EngineSettings.GeneralProjectSettings", "ProjectName")]