---
title: "QuartzUIPlatform: declaration reference"
description: "Quartz UI 0.57.0-dev: QuartzUIPlatform: declaration reference. Source-reviewed guidance, usage and limitations."
status: approved
visibility: public
sourceRevision: fe5b709ec900e282b50e58b819a25041945005f9
reviewedAt: 2026-09-24
---

# QuartzUIPlatform: declaration reference

> **0.57.0-dev · beta source documentation.** Native, Blueprint, Editor and rendering examples are source-reviewed, not executed in Unreal during this scan. See [validation and limits](https://betterbuilt.games/docs/quartz-ui/evidence).

Pinned source (source: `Source/QuartzUIRuntime/Public/QuartzUIPlatform.h`) · [integration recipe](https://betterbuilt.games/docs/quartz-ui/inventory#quartzuiplatform) · [practical guide](https://betterbuilt.games/docs/quartz-ui/views-input)

## FQuartzUIPlatformContext

**Public type.** Backend-neutral platform policy published to every view owned by a layer host. Wire role: payload of `quartzui.platform` (state).

**Prerequisites / integration:** Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the [QuartzUIPlatform recipe](https://betterbuilt.games/docs/quartz-ui/inventory#quartzuiplatform) in the host module `QuartzUIRuntime`.

**Minimal example / lifecycle:** `client.subscribeState('quartzui.platform', value => { /* read this DTO */ })`. Copied coalesced exact-player state.

**Avoid:** Using browser OS probing to select authoritative platform policy. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: `Source/QuartzUIRuntime/Public/QuartzUIPlatform.h#L9`)

## FQuartzUIPlatformPolicy

**Internal type.** Validation, normalization, and protocol-v1 serialization for platform context.

**Prerequisites / integration:** Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the [QuartzUIPlatform recipe](https://betterbuilt.games/docs/quartz-ui/inventory#quartzuiplatform) in the host module `QuartzUIRuntime`.

**Minimal example / lifecycle:** LayerHost->SetPlatformContext(Context). Copied coalesced exact-player state.

**Avoid:** Using browser OS probing to select authoritative platform policy. This named helper is runtime-owned; inspect/use it through the owner above rather than constructing it in gameplay.

Exact source line (source: `Source/QuartzUIRuntime/Public/QuartzUIPlatform.h#L28`)

## Complete header

Source snapshot, not an additional example. Unreal annotations distinguish exposed Blueprint nodes from native-only/private methods.

```cpp
#pragma once

#include "CoreMinimal.h"

#include "QuartzUIPlatform.generated.h"

/** Backend-neutral platform policy published to every view owned by a layer host. */
USTRUCT(BlueprintType, meta = (QuartzUITypeName = "QuartzUIPlatformState"))
struct QUARTZUIRUNTIME_API FQuartzUIPlatformContext
{
	GENERATED_BODY()

	/** Unreal ini platform name, an editor simulation name, or a project-defined identifier. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Platform", meta = (QuartzUIName = "platform"))
	FName PlatformId = TEXT("generic");

	/** Open policy identifiers such as Platform.Trait.CanExitApplication. */
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "QuartzUI|Platform", meta = (QuartzUIName = "traits"))
	TArray<FName> Traits;

	bool operator==(const FQuartzUIPlatformContext& Other) const
	{
		return PlatformId == Other.PlatformId && Traits == Other.Traits;
	}
};

/** Validation, normalization, and protocol-v1 serialization for platform context. */
class QUARTZUIRUNTIME_API FQuartzUIPlatformPolicy final
{
public:
	static constexpr int32 MaxTraits = 128;
	static constexpr int32 MaxIdentifierLength = 128;

	static bool IsValidIdentifier(FName Identifier);
	static bool TryNormalize(
		const FQuartzUIPlatformContext& Context,
		FQuartzUIPlatformContext& OutNormalizedContext);
	static bool TrySerialize(
		const FQuartzUIPlatformContext& Context,
		FString& OutPayloadJson);
};
```

Canonical HTML: https://betterbuilt.games/docs/quartz-ui/reference-quartzuiplatform
