Cesium for Unreal
2.21.1
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 "
CesiumCommon.h
"
6
#include "Engine/AssetUserData.h"
7
#include "CesiumMaterialUserData.generated.h"
8
9
/**
10
* Instances of this user data class are automatically attached to all materials
11
* that are used by Cesium for Unreal and that have a Layer Stack named
12
* "Cesium". It provides a way for Cesium for Unreal to access the names of the
13
* individual layers in the stack at runtime (i.e. outside the Editor) so that
14
* they can be mapped to raster overlays.
15
*
16
* It works by responding, in the Editor, to changes in the Material to which
17
* it's attached via the `PostEditChangeOwner` and updating its internal mirror
18
* of the layer names. At runtime, these layer names that were configured in the
19
* Editor can't be further changed, so the the mirrored list is still valid.
20
*/
21
UCLASS()
22
class
UCesiumMaterialUserData
: public UAssetUserData {
23
GENERATED_BODY()
24
25
public
:
26
#if ENGINE_VERSION_5_6_OR_HIGHER
27
virtual
void
PostEditChangeOwner
(
28
const
FPropertyChangedEvent& PropertyChangedEvent)
override
;
29
#else
30
virtual
void
PostEditChangeOwner
()
override
;
31
#endif
32
33
void
UpdateLayerNames
();
34
35
UPROPERTY()
36
TArray<FString>
LayerNames
;
37
};
CesiumCommon.h
UCesiumMaterialUserData
Instances of this user data class are automatically attached to all materials that are used by Cesium...
Definition
CesiumMaterialUserData.h:22
UCesiumMaterialUserData::LayerNames
TArray< FString > LayerNames
Definition
CesiumMaterialUserData.h:36
UCesiumMaterialUserData::PostEditChangeOwner
virtual void PostEditChangeOwner() override
UCesiumMaterialUserData::UpdateLayerNames
void UpdateLayerNames()
Source
CesiumRuntime
Public
CesiumMaterialUserData.h
Generated by
1.13.2