Navigation
API > API/Plugins > API/Plugins/Paper2D
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UMeshComponent
- PAPER2UPaperGroupedSpriteComponent
References
| Module | Paper2D |
| Header | /Engine/Plugins/2D/Paper2D/Source/Paper2D/Classes/PaperGroupedSpriteComponent.h |
| Include | #include "PaperGroupedSpriteComponent.h" |
Syntax
UCLASS&40;ShowCategories&61;&40;Mobility&41;, ClassGroup&61;Paper2D, Meta&61;&40;BlueprintSpawnableComponent&41;,
EarlyAccessPreview&41;
class PAPER2UPaperGroupedSpriteComponent : public UMeshComponent
Remarks
A component that handles rendering and collision for many instances of one or more UPaperSprite assets.
Variables
| Type | Name | Description | |
|---|---|---|---|
| friend | FGroupedSpriteSceneProxy | ||
| TArray< FBodyInstance * > | InstanceBodies | Physics representation of the instance bodies | |
| TArray< TObjectPtr< UMaterialInterface > > | InstanceMaterials | Array of materials used by the instances | |
| TArray< FSpriteInstanceData > | PerInstanceSpriteData | Array of instances |
Constructors
| Type | Name | Description | |
|---|---|---|---|
PAPER2UPaperGroupedSpriteComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | AddInstance
(
const FTransform& Transform, |
Add an instance to this component. | |
| int32 | AddInstanceWithMaterial
(
const FTransform& Transform, |
||
| void | Terminate all body instances owned by this component | ||
| void | Clear all instances being rendered by this component | ||
| bool | ContainsSprite
(
UPaperSprite* SpriteAsset |
Returns true if this component references the specified sprite asset. | |
| void | Creates body instances for all instances owned by this component | ||
| int32 | Get the number of instances in this component | ||
| bool | GetInstanceTransform
(
int32 InstanceIndex, |
Get the transform for the instance specified. | |
| void | GetNavigationPerInstanceTransforms
(
const FBox& AreaBox, |
Handles request from navigation system to gather instance transforms in a specific area box | |
| const TArray< FSpriteInstanceData > & | |||
| void | GetReferencedSpriteAssets
(
TArray< UObject* >& InOutObjects |
Adds all referenced sprite assets to the specified list. | |
| FBodyInstance * | InitInstanceBody
(
int32 InstanceIndex, |
Creates a body instance for the specified instance data if that sprite has defined collision | |
| void | Invalidates the render and collision state | ||
| void | Creates the material list from the instances | ||
| void | 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 | ||
| bool | RemoveInstance
(
int32 InstanceIndex |
Remove the instance specified. Returns True on success. | |
| void | SetupNewInstanceData
(
FSpriteInstanceData& InOutNewInstanceData, |
Sets up new instance data to sensible defaults, creates physics counterparts if possible | |
| void | SortInstancesAlongAxis
(
FVector WorldSpaceSortAxis |
Sort all instances by their world space position along the specified axis | |
| bool | UpdateInstanceColor
(
int32 InstanceIndex, |
Update the color for the instance specified. Returns True on success. | |
| bool | UpdateInstanceTransform
(
int32 InstanceIndex, |
Update the transform for the instance specified. | |
| int32 | UpdateMaterialList
(
UPaperSprite* Sprite, |
Adds to the material list from a single sprite |
Overridden from UPrimitiveComponent
| Type | Name | Description | |
|---|---|---|---|
| bool | Determines whether or not the simulate physics setting can be edited interactively on this component | ||
| FPrimitiveSceneProxy * | Creates a proxy to represent the primitive to the scene manager in the rendering thread. | ||
| bool | DoCustomNavigableGeometryExport
(
FNavigableGeometryExport& GeomExport |
Collects custom navigable geometry of component. | |
| UMaterialInterface * | GetMaterial
(
int32 ElementIndex |
Returns the material used by the element at the specified index | |
| int32 | Return number of material elements in this primitive | ||
| void | GetUsedTextures
(
TArray< UTexture* >& OutTextures, |
Returns the material textures used to render this primitive for the given platform. |
Overridden from USceneComponent
| Type | Name | Description | |
|---|---|---|---|
| FBoxSphereBounds | CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. | |
| void | OnUpdateTransform
(
EUpdateTransformFlags UpdateTransformFlags, |
Native callback when this component is moved |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| const UObject * | Give a readable name for this component, including asset name if applicable | ||
| void | 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. | ||
| void | Used to create any physics engine information for this component | ||
| void | Used to shut down and physics engine structure for this component | ||
| bool | Return true if CreatePhysicsState() should be called. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostEditChangeChainProperty
(
FPropertyChangedChainEvent& PropertyChangedEvent |
This alternate version of PostEditChange is called when properties inside structs are modified. | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | PostEditUndo () |
Called after applying a transaction to the object. |
Overridden from INavRelevantInterface
| Type | Name | Description | |
|---|---|---|---|
| void | GetNavigationData
(
FNavigationRelevantData& Data |
Prepare navigation modifiers |
See Also
UPaperSprite