UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ISMComponentDescriptor.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
8#include "ISMComponentDescriptor.generated.h"
9
11class UStaticMesh;
13enum class ERendererStencilMask : uint8;
14
17USTRUCT()
19{
21
26
28
29 ENGINE_API virtual void InitFrom(const UStaticMeshComponent* Component, bool bInitBodyInstance = true);
30 ENGINE_API virtual uint32 ComputeHash() const;
31 ENGINE_API virtual void InitComponent(UInstancedStaticMeshComponent* ISMComponent) const;
32
33 ENGINE_API void PostLoadFixup(UObject* Loader);
34
36 ENGINE_API bool operator==(const FISMComponentDescriptorBase& Other) const;
37
38 static UMaterialInterface* DuplicateMaterialInterface(const UMaterialInterface& InMaterialInterface, UObject& NewOuter);
39
41 {
42 return Key.GetTypeHash();
43 }
44
46 {
47 if (Hash == 0)
48 {
50 }
51 return Hash;
52 }
53
54public:
55 UPROPERTY()
57
58 UPROPERTY(EditAnywhere, Category = "Component Settings")
60
61 UPROPERTY(EditAnywhere, Category = "Component Settings")
63
64 UPROPERTY(EditAnywhere, Category = "Component Settings")
65 ERuntimeVirtualTextureMainPassType VirtualTextureRenderPassType;
66
67 UPROPERTY(EditAnywhere, Category = "Component Settings")
68 ELightmapType LightmapType;
69
70 UPROPERTY(EditAnywhere, Category = "Component Settings")
71 FLightingChannels LightingChannels;
72
73 UPROPERTY(EditAnywhere, Category = "Component Settings")
74 int32 RayTracingGroupId;
75
76 UPROPERTY(EditAnywhere, Category = "Component Settings")
77 ERayTracingGroupCullingPriority RayTracingGroupCullingPriority;
78
79 UPROPERTY(EditAnywhere, Category = "Component Settings")
80 TEnumAsByte<EHasCustomNavigableGeometry::Type> bHasCustomNavigableGeometry;
81
82 UPROPERTY(EditAnywhere, Category = "Component Settings")
83 ERendererStencilMask CustomDepthStencilWriteMask;
84
85 UPROPERTY(EditAnywhere, Category = "Component Settings")
86 FBodyInstance BodyInstance;
87
88 UPROPERTY(EditAnywhere, Category = "Component Settings")
89 int32 InstanceMinDrawDistance;
90
91 UPROPERTY(EditAnywhere, Category = "Component Settings")
92 int32 InstanceStartCullDistance;
93
94 UPROPERTY(EditAnywhere, Category = "Component Settings")
95 int32 InstanceEndCullDistance;
96
97 UPROPERTY(EditAnywhere, Category = "Component Settings")
98 float InstanceLODDistanceScale;
99
100 UPROPERTY(EditAnywhere, Category = "Component Settings")
101 int32 VirtualTextureCullMips;
102
103 UPROPERTY(EditAnywhere, Category = "Component Settings")
104 int32 TranslucencySortPriority;
105
106 UPROPERTY(EditAnywhere, Category = "Component Settings")
107 int32 OverriddenLightMapRes;
108
109 UPROPERTY(EditAnywhere, Category = "Component Settings")
110 int32 CustomDepthStencilValue;
111
112#if WITH_EDITORONLY_DATA
113 UPROPERTY(EditAnywhere, Category = "Component Settings")
115#endif
116
117 UPROPERTY(EditAnywhere, Category = "Component Settings")
118 uint8 bCastShadow : 1;
119
120 UPROPERTY(EditAnywhere, Category = "Component Settings")
121 uint8 bEmissiveLightSource : 1;
122
123 UPROPERTY(EditAnywhere, Category = "Component Settings")
124 uint8 bAffectDynamicIndirectLighting : 1;
125
126 UPROPERTY(EditAnywhere, Category = "Component Settings")
127 uint8 bAffectDynamicIndirectLightingWhileHidden : 1;
128
129 UPROPERTY(EditAnywhere, Category = "Component Settings")
130 uint8 bAffectDistanceFieldLighting : 1;
131
132 UPROPERTY(EditAnywhere, Category = "Component Settings")
133 uint8 bCastDynamicShadow : 1;
134
135 UPROPERTY(EditAnywhere, Category = "Component Settings")
136 uint8 bCastStaticShadow : 1;
137
138 UPROPERTY(EditAnywhere, Category = "Component Settings")
139 uint8 bCastVolumetricTranslucentShadow : 1;
140
141 UPROPERTY(EditAnywhere, Category = "Component Settings")
142 uint8 bCastContactShadow : 1;
143
144 UPROPERTY(EditAnywhere, Category = "Component Settings")
145 uint8 bSelfShadowOnly : 1;
146
147 UPROPERTY(EditAnywhere, Category = "Component Settings")
148 uint8 bCastFarShadow : 1;
149
150 UPROPERTY(EditAnywhere, Category = "Component Settings")
151 uint8 bCastInsetShadow : 1;
152
153 UPROPERTY(EditAnywhere, Category = "Component Settings")
154 uint8 bCastCinematicShadow : 1;
155
156 UPROPERTY(EditAnywhere, Category = "Component Settings")
157 uint8 bCastHiddenShadow : 1;
158
159 UPROPERTY(EditAnywhere, Category = "Component Settings")
160 uint8 bCastShadowAsTwoSided : 1;
161
162 UPROPERTY(EditAnywhere, Category = "Component Settings")
163 uint8 bReceivesDecals : 1;
164
165 UPROPERTY(EditAnywhere, Category = "Component Settings")
166 uint8 bOverrideLightMapRes : 1;
167
168 UPROPERTY(EditAnywhere, Category = "Component Settings")
169 uint8 bUseAsOccluder : 1;
170
171 UPROPERTY(EditAnywhere, Category = "Component Settings")
172 uint8 bEnableDensityScaling : 1;
173
174 UPROPERTY(EditAnywhere, Category = "Component Settings")
175 uint8 bEnableDiscardOnLoad : 1;
176
177 UPROPERTY(EditAnywhere, Category = "Component Settings")
178 uint8 bRenderCustomDepth : 1;
179
180 UPROPERTY(EditAnywhere, Category = "Component Settings")
181 uint8 bVisibleInRayTracing : 1;
182
183 UPROPERTY(EditAnywhere, Category = "Component Settings")
184 uint8 bRenderInMainPass : 1;
185
186 UPROPERTY(EditAnywhere, Category = "Component Settings")
187 uint8 bRenderInDepthPass : 1;
188
189 UPROPERTY(EditAnywhere, Category = "Component Settings")
190 uint8 bHiddenInGame : 1;
191
192 UPROPERTY(EditAnywhere, Category = "Component Settings")
193 uint8 bIsEditorOnly : 1;
194
195 UPROPERTY(EditAnywhere, Category = "Component Settings")
196 uint8 bVisible : 1;
197
198 UPROPERTY(EditAnywhere, Category = "Component Settings")
199 uint8 bSelectable : 1;
200
201 UPROPERTY(EditAnywhere, Category = "Component Settings")
202 uint8 bHasPerInstanceHitProxies : 1;
203
204 UPROPERTY(EditAnywhere, Category = "Component Settings")
205 uint8 bEvaluateWorldPositionOffset : 1;
206
207 UPROPERTY(EditAnywhere, Category = "Component Settings")
208 uint8 bReverseCulling : 1;
209
210 UPROPERTY(EditAnywhere, Category = "Component Settings")
211 uint8 bUseGpuLodSelection : 1;
212
213#if WITH_EDITORONLY_DATA
214 UPROPERTY(EditAnywhere, Category = "Component Settings")
216
217 UPROPERTY(EditAnywhere, Category = "Component Settings")
219#endif
220
221 UPROPERTY(EditAnywhere, Category = "Component Settings", meta = (DisplayAfter = "bGenerateOverlapEvents"))
222 uint8 bUseDefaultCollision : 1;
223
224 UPROPERTY(EditAnywhere, Category = "Component Settings", meta = (DisplayAfter = "CustomDepthStencilWriteMask"))
225 uint8 bGenerateOverlapEvents : 1;
226
227 UPROPERTY(EditAnywhere, Category = "Component Settings")
228 uint8 bOverrideNavigationExport : 1;
229
230 UPROPERTY(EditAnywhere, Category = "Component Settings")
231 uint8 bForceNavigationObstacle : 1;
232
233 UPROPERTY(EditAnywhere, Category = "Component Settings")
234 uint8 bCanEverAffectNavigation : 1;
235
236 UPROPERTY(EditAnywhere, Category = "Component Settings")
237 uint8 bFillCollisionUnderneathForNavmesh : 1;
238
239 UPROPERTY(EditAnywhere, Category = "Component Settings")
240 uint8 bRasterizeAsFilledConvexVolume : 1;
241
242 UPROPERTY(EditAnywhere, Category = "Component Settings")
243 int32 WorldPositionOffsetDisableDistance;
244
245 UPROPERTY(EditAnywhere, Category = "Component Settings")
246 int32 NanitePixelProgrammableDistance;
247
248 UPROPERTY(EditAnywhere, Category = "Component Settings")
249 EShadowCacheInvalidationBehavior ShadowCacheInvalidationBehavior;
250
251 UPROPERTY(EditAnywhere, Category = "Component Settings")
253};
254
255USTRUCT()
257{
259
264 static ENGINE_API FISMComponentDescriptor CreateFrom(const TSubclassOf<UStaticMeshComponent>& ComponentClass);
265
266 ENGINE_API virtual void InitFrom(const UStaticMeshComponent* Component, bool bInitBodyInstance = true) override;
267 ENGINE_API virtual uint32 ComputeHash() const;
268 ENGINE_API virtual void InitComponent(UInstancedStaticMeshComponent* ISMComponent) const override;
269
271 {
272 return StaticMeshComponent;
273 }
274
276 ENGINE_API bool operator==(const FISMComponentDescriptor& Other) const;
277
278 friend inline bool operator<(const FISMComponentDescriptor& Lhs, const FISMComponentDescriptor& Rhs)
279 {
280 return Lhs.Hash < Rhs.Hash;
281 }
282
283public:
284 UPROPERTY(EditAnywhere, Category = "Component Settings", meta = (DisplayAfter = "ComponentClass"))
286
287 UPROPERTY(EditAnywhere, Category = "Component Settings", meta = (DisplayAfter = "ComponentClass"))
289
290 UPROPERTY(EditAnywhere, Category = "Component Settings", meta = (DisplayAfter = "ComponentClass"))
292
293 UPROPERTY(EditAnywhere, Category = "Component Settings", meta = (DisplayAfter = "ComponentClass"))
294 TArray<TObjectPtr<URuntimeVirtualTexture>> RuntimeVirtualTextures;
295
296 UPROPERTY(EditAnywhere, Category = "Component Settings", meta = (DisplayAfter = "ComponentClass"))
297 FTransform LocalTransform = FTransform::Identity;
298
299private:
301 TWeakObjectPtr<const UStaticMeshComponent> StaticMeshComponent = nullptr;
302};
303
304USTRUCT()
306{
308
314
315 ENGINE_API virtual void InitFrom(const UStaticMeshComponent* Component, bool bInitBodyInstance = true) override;
316 ENGINE_API virtual uint32 ComputeHash() const;
317 ENGINE_API virtual void InitComponent(UInstancedStaticMeshComponent* ISMComponent) const override;
318
320 ENGINE_API bool operator==(const FSoftISMComponentDescriptor& Other) const;
321
322 friend inline bool operator<(const FSoftISMComponentDescriptor& Lhs, const FSoftISMComponentDescriptor& Rhs)
323 {
324 return Lhs.Hash < Rhs.Hash;
325 }
326
327public:
328 UPROPERTY(EditAnywhere, Category = "Component Settings", meta = (DisplayAfter = "ComponentClass"))
330
331 UPROPERTY(EditAnywhere, Category = "Component Settings", meta = (DisplayAfter = "ComponentClass"))
333
334 UPROPERTY(EditAnywhere, Category = "Component Settings", meta = (DisplayAfter = "ComponentClass"))
336
337 UPROPERTY(EditAnywhere, Category = "Component Settings", meta = (DisplayAfter = "ComponentClass"))
339};
ENoInit
Definition CoreMiscDefines.h:158
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
ELightmapType
Definition EngineTypes.h:210
EHLODBatchingPolicy
Definition HLODBatchingPolicy.h:14
UE_FORCEINLINE_HINT bool operator!=(const FIndexedPointer &Other) const
Definition LockFreeList.h:76
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
EObjectFlags
Definition ObjectMacros.h:552
@ RF_NoFlags
No flags, used to avoid a cast.
Definition ObjectMacros.h:555
#define USTRUCT(...)
Definition ObjectMacros.h:746
ERendererStencilMask
Definition PrimitiveComponent.h:103
ERayTracingGroupCullingPriority
Definition PrimitiveComponent.h:119
uint64 ComputeHash(const FRHITextureCreateInfo &InCreateInfo, uint64 HeapOffset)
Definition RHICoreTransientResourceAllocator.h:15
ERuntimeVirtualTextureMainPassType
Definition RuntimeVirtualTextureEnum.h:58
EDetailMode
Definition SceneComponent.h:32
EShadowCacheInvalidationBehavior
Definition SceneTypes.h:219
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition NameTypes.h:617
Definition Array.h:670
Definition EnumAsByte.h:22
Definition SubclassOf.h:30
Definition InstancedStaticMeshComponent.h:158
Definition MaterialInterface.h:296
Definition Object.h:95
Definition RuntimeVirtualTexture.h:18
Definition StaticMesh.h:593
Definition EngineTypes.h:3787
Definition NavigationElement.h:18
Definition BodyInstance.h:320
Definition ISMComponentDescriptor.h:19
uint32 Hash
Definition ISMComponentDescriptor.h:56
friend uint32 GetTypeHash(const FISMComponentDescriptorBase &Key)
Definition ISMComponentDescriptor.h:40
ENGINE_API FISMComponentDescriptorBase(const FISMComponentDescriptorBase &)
uint32 GetTypeHash() const
Definition ISMComponentDescriptor.h:45
virtual ENGINE_API ~FISMComponentDescriptorBase()
Definition ISMComponentDescriptor.h:257
friend bool operator<(const FISMComponentDescriptor &Lhs, const FISMComponentDescriptor &Rhs)
Definition ISMComponentDescriptor.h:278
ENGINE_API FISMComponentDescriptor(const FISMComponentDescriptor &)
ENGINE_API ~FISMComponentDescriptor()
TWeakObjectPtr< const UStaticMeshComponent > GetStaticMeshComponent() const
Definition ISMComponentDescriptor.h:270
Definition EngineTypes.h:562
Definition ISMComponentDescriptor.h:306
static ENGINE_API FSoftISMComponentDescriptor CreateFrom(const TSubclassOf< UStaticMeshComponent > &ComponentClass)
friend bool operator<(const FSoftISMComponentDescriptor &Lhs, const FSoftISMComponentDescriptor &Rhs)
Definition ISMComponentDescriptor.h:322
ENGINE_API ~FSoftISMComponentDescriptor()
ENGINE_API FSoftISMComponentDescriptor(const FSoftISMComponentDescriptor &Other)
Definition ObjectPtr.h:488
Definition SoftObjectPtr.h:174
Definition WeakObjectPtrTemplates.h:25