Navigation
API > API/Runtime > API/Runtime/UMG
A widget that draws vertexes provided by a 2.5D StaticMesh. The Mesh's material is used. Hardware instancing is supported.
| Name | SMeshWidget |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Slate/SMeshWidget.h |
| Include Path | #include "Slate/SMeshWidget.h" |
Syntax
class SMeshWidget :
public SLeafWidget ,
public FGCObject
Inheritance Hierarchy
- FGCObject → SMeshWidget
- FSharedFromThisBase → TSharedFromThis → SWidget → SLeafWidget → SMeshWidget
- FSlateControlledConstruction → SWidget → SLeafWidget → SMeshWidget
Classes
| Name | Remarks |
|---|---|
| FRenderRun | Which mesh to draw, starting with which instance offset and how many instances to draw in this run/batch. |
Structs
| Name | Remarks |
|---|---|
| FArguments | |
| FRenderData |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| RenderRuns | TArray< FRenderRun > | Slate/SMeshWidget.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
uint32 AddMesh
(
USlateVectorArtData& InMeshData |
Draw the InStaticMesh when this widget paints. | Slate/SMeshWidget.h | |
uint32 AddMeshWithInstancing
(
USlateVectorArtData& InMeshData, |
Much like AddMesh, but also enables instancing support for this MeshId. | Slate/SMeshWidget.h | |
void AddRenderRun
(
uint32 InMeshIndex, |
Tell the widget to draw instances of a mesh a given number of times starting at a given offset. | Slate/SMeshWidget.h | |
void ClearRuns
(
int32 NumRuns |
Discard any previous runs and reserve space for new render runs if needed. | Slate/SMeshWidget.h | |
void Construct
(
const FArguments& Args |
Slate/SMeshWidget.h | ||
UMaterialInstanceDynamic * ConvertToMID
(
uint32 MeshId |
Switch from static material to material instance dynamic. | Slate/SMeshWidget.h | |
void EnableInstancing
(
uint32 MeshId, |
Enable hardware instancing | Slate/SMeshWidget.h | |
void UpdatePerInstanceBuffer
(
uint32 MeshId, |
Updates the per instance buffer. Automatically enables hardware instancing. | Slate/SMeshWidget.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual int32 OnPaint
(
const FPaintArgs& Args, |
Slate/SMeshWidget.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector2D ComputeDesiredSize
(
float |
Slate/SMeshWidget.h |
Overridden from FGCObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddReferencedObjects
(
FReferenceCollector& Collector |
~ FGCObject | Slate/SMeshWidget.h | |
virtual FString GetReferencerName() |
Slate/SMeshWidget.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void PushUpdate
(
uint32 VectorArtId, |
Slate/SMeshWidget.h | ||
static void PushUpdate
(
uint32 VectorArtId, |
Slate/SMeshWidget.h |