You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
[ConfigFile(...)] can be added to both fields and properties. The latter can be useful e.g. with derived properties. #rb Joe.Kirchoff #jira none #preflight 62825962046b81bf93bc5201 [CL 20223985 by Wojciech Krywult in ue5-main branch]
46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace UnrealBuildTool
|
|
{
|
|
/// <summary>
|
|
/// Attribute indicating a value which should be populated from a UE .ini config file
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
|
|
public class ConfigFileAttribute : Attribute
|
|
{
|
|
/// <summary>
|
|
/// Name of the config hierarchy to read from
|
|
/// </summary>
|
|
public ConfigHierarchyType ConfigType;
|
|
|
|
/// <summary>
|
|
/// Section containing the setting
|
|
/// </summary>
|
|
public string SectionName;
|
|
|
|
/// <summary>
|
|
/// Key name to search for
|
|
/// </summary>
|
|
public string? KeyName;
|
|
|
|
/// <summary>
|
|
/// Constructor
|
|
/// </summary>
|
|
/// <param name="ConfigType">Type of the config hierarchy to read from</param>
|
|
/// <param name="SectionName">Section containing the setting</param>
|
|
/// <param name="KeyName">Key name to search for. Optional; uses the name of the field if not set.</param>
|
|
public ConfigFileAttribute(ConfigHierarchyType ConfigType, string SectionName, string? KeyName = null)
|
|
{
|
|
this.ConfigType = ConfigType;
|
|
this.SectionName = SectionName;
|
|
this.KeyName = KeyName;
|
|
}
|
|
}
|
|
}
|