UPaperGroupedSpriteComponent

Inheritance Hierarchy

Syntax

UCLASS (ShowCategories=(Mobility) , ClassGroup=Paper2D , Meta=(BlueprintSpawnableComponent),
       EarlyAccessPreview)
class UPaperGroupedSpriteComponent : public UMeshComponent

Remarks

A component that handles rendering and collision for many instances of one or more UPaperSprite assets.

Variables

Name Description

Protected variable

friend

 

FGroupedSpriteSceneProxy

Protected variable

TArray < FBodyIn ...

 

InstanceBodies

Physics representation of the instance bodies

Protected variable UProperty

TArray < UMateri ...

 

InstanceMaterials

Array of materials used by the instances

Protected variable UProperty Category, EditAnywhere, Meta displayname

TArray < FSprite ...

 

PerInstanceSpriteData

Array of instances

Functions

Name Description

Public function UFunction BlueprintCallable, Category

int32

 

AddInstance

(
    const FTransform & Transform,
    UPaperSprite * Sprite,
    bool bWorldSpace,
    FLinearColor Color
)

Add an instance to this component.

Public function Virtual

int32

 

AddInstanceWithMaterial

(
    const FTransform & Transform,
    UPaperSprite * Sprite,
    UMaterialInterface * MaterialOv...,
    bool bWorldSpace,
    FLinearColor Color
)

Protected function

void

 

ClearAllInstanceBodies()

Terminate all body instances owned by this component

Public function Virtual UFunction BlueprintCallable, Category

void

 

ClearInstances()

Clear all instances being rendered by this component

Public function

bool

 

ContainsSprite

(
    UPaperSprite * SpriteAsset
)

End of UObject interface.

Protected function

void

 

CreateAllInstanceBodies()

Creates body instances for all instances owned by this component

Public function UFunction BlueprintCallable, Category

int32

 

GetInstanceCount()

Get the number of instances in this component

Public function UFunction BlueprintCallable, Category

bool

 

GetInstanceTransform

(
    int32 InstanceIndex,
    FTransform & OutInstanceTransform,
    bool bWorldSpace
)

Get the transform for the instance specified.

Public function

void

 

GetNavigationPerInstanceTransforms

(
    const FBox & AreaBox,
    TArray < FTransform >& OutInstanceT...
)

Handles request from navigation system to gather instance transforms in a specific area box

Public function

const TArray ...

 

GetPerInstanceSpriteData()

Public function

void

 

GetReferencedSpriteAssets

(
    TArray < UObject * >& InOutObje...
)

Adds all referenced sprite assets to the specified list.

Protected function

FBodyInstanc ...

 

InitInstanceBody

(
    int32 InstanceIndex,
    const FSpriteInstanceData & Instanc...,
    FPhysScene * PhysScene
)

Creates a body instance for the specified instance data if that sprite has defined collision

Protected function

void

 

RebuildInstances()

Invalidates the render and collision state

Protected function

void

 

RebuildMaterialList()

Creates the material list from the instances

Protected function

void

 

ReleasePerInstanceRenderData()

Transfers ownership of instance render data to a render thread instance render data will be released in scene proxy dtor or on render thread task

Public function Virtual UFunction BlueprintCallable, Category

bool

 

RemoveInstance

(
    int32 InstanceIndex
)

Remove the instance specified. Returns True on success.

Protected function

void

 

SetupNewInstanceData

(
    FSpriteInstanceData & InOutNewInsta...,
    int32 InInstanceIndex,
    const FTransform & InInstanceTransf...,
    UPaperSprite * InSprite,
    UMaterialInterface * MaterialOv...,
    const FColor & InColor
)

Sets up new instance data to sensible defaults, creates physics counterparts if possible

Public function UFunction BlueprintCallable, Category

void

 

SortInstancesAlongAxis

(
    FVector WorldSpaceSortAxis
)

Sort all instances by their world space position along the specified axis

Public function Virtual UFunction BlueprintCallable, Category

bool

 

UpdateInstanceColor

(
    int32 InstanceIndex,
    FLinearColor NewInstanceColor,
    bool bMarkRenderStateDirty
)

Update the color for the instance specified. Returns True on success.

Public function Virtual UFunction BlueprintCallable, Category

bool

 

UpdateInstanceTransform

(
    int32 InstanceIndex,
    const FTransform & NewInstanceTrans...,
    bool bWorldSpace,
    bool bMarkRenderStateDirty,
    bool bTeleport
)

Update the transform for the instance specified.

Protected function

int32

 

UpdateMaterialList

(
    UPaperSprite * Sprite,
    UMaterialInterface * MaterialOv...
)

Adds to the material list from a single sprite

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

bool

 

CanEditSimulatePhysics()

Determines whether or not the simulate physics setting can be edited interactively on this component

Public function Virtual

FPrimitiveSc ...

 

CreateSceneProxy()

End of UActorComponent interface.

Public function Virtual

bool

 

DoCustomNavigableGeometryExport

(
    FNavigableGeometryExport & GeomExpo...
)

Collects custom navigable geometry of component.

Public function Virtual

UMaterialInt ...

 

GetMaterial

(
    int32 ElementIndex
)

Returns the material used by the element at the specified index

Public function Virtual

int32

 

GetNumMaterials()

Number of material elements in this primitive

Public function Virtual

void

 

GetUsedTextures

(
    TArray < UTexture* >& OutTextu...,
    EMaterialQualityLevel::Type Quality...
)

Returns the material textures used to render this primitive for the given platform.

Overridden from USceneComponent

Name Description

Public function Virtual

FBoxSphereBo ...

 

CalcBounds

(
    const FTransform & LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Public function Virtual

void

 

OnUpdateTransform

(
    EUpdateTransformFlags UpdateTransfo...,
    ETeleportType Teleport
)

Overridden from UActorComponent

Name Description

Public function Virtual

const UObjec ...

 

AdditionalStatObject()

Give a readable name for this component, including asset name if applicable

Public function Virtual

void

 

CheckForErrors()

Function that gets called from within Map_Check to allow this actor component to check itself for any potential errors and register them with map check dialog.

Protected function Virtual

void

 

OnCreatePhysicsState()

Used to create any physics engine information for this component

Protected function Virtual

void

 

OnDestroyPhysicsState()

Used to shut down and physics engine structure for this component

Public function Virtual

bool

 

ShouldCreatePhysicsState()

UActorComponent interface.

Overridden from UObject

Name Description

Public function Virtual

void

 

PostEditChangeChainProperty

(
    FPropertyChangedChainEvent & Proper...
)

This alternate version of PostEditChange is called when properties inside structs are modified.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent & PropertyCha...
)

End of UPrimitiveComponent interface.

Public function Virtual

void

 

PostEditUndo()

Called after applying a transaction to the object.

Overridden from INavRelevantInterface

Name Description

Public function Virtual

void

 

GetNavigationData

(
    FNavigationRelevantData & Data
)

Prepare navigation modifiers

See Also

References

Module

Paper2D