Cesium for Unreal 2.21.0
Loading...
Searching...
No Matches
CesiumMaterialUserData.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
5#include "Engine/AssetUserData.h"
6#include "CesiumMaterialUserData.generated.h"
7
8/**
9 * Instances of this user data class are automatically attached to all materials
10 * that are used by Cesium for Unreal and that have a Layer Stack named
11 * "Cesium". It provides a way for Cesium for Unreal to access the names of the
12 * individual layers in the stack at runtime (i.e. outside the Editor) so that
13 * they can be mapped to raster overlays.
14 *
15 * It works by responding, in the Editor, to changes in the Material to which
16 * it's attached via the `PostEditChangeOwner` and updating its internal mirror
17 * of the layer names. At runtime, these layer names that were configured in the
18 * Editor can't be further changed, so the the mirrored list is still valid.
19 */
20UCLASS()
21class UCesiumMaterialUserData : public UAssetUserData {
22 GENERATED_BODY()
23
24public:
25 virtual void PostEditChangeOwner() override;
26
27 UPROPERTY()
28 TArray<FString> LayerNames;
29};
Instances of this user data class are automatically attached to all materials that are used by Cesium...
virtual void PostEditChangeOwner() override