Navigation
API > API/Runtime > API/Runtime/RenderCore
Caches a CVar value per target platform. Use this instead of FShaderPlatformCachedIniValue when a setting must be identical across all shader platforms that share a target platform. For example, a feature that affects both shader compilation AND mesh or texture format. Under the hood this is almost the same as FShaderPlatformCachedIniValue but exposes the extra Get() by platform name.
Usage from shader code: static FTargetPlatformCachedIniValue
Usage from mesh cook code: bool bEnabled = MyFeature.Get(FName(TargetPlatform->IniPlatformName()));
| Name | FTargetPlatformCachedIniValue |
| Type | struct |
| Header File | /Engine/Source/Runtime/RenderCore/Public/ShaderPlatformCachedIniValue.h |
| Include Path | #include "ShaderPlatformCachedIniValue.h" |
Syntax
template<typename Type>
struct FTargetPlatformCachedIniValue
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTargetPlatformCachedIniValue
(
TCHAR const* InCVarName |
ShaderPlatformCachedIniValue.h | ||
FTargetPlatformCachedIniValue
(
IConsoleVariable* InCVar |
ShaderPlatformCachedIniValue.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CVar | IConsoleVariable * | ShaderPlatformCachedIniValue.h | ||
| CVarName | FString | ShaderPlatformCachedIniValue.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
Type Get
(
EShaderPlatform ShaderPlatform |
Look up by shader platform. Shader platforms on the same target should return the same value. | ShaderPlatformCachedIniValue.h | |
| Look up by IniPlatformName directly. | ShaderPlatformCachedIniValue.h |