Navigation
API > API/Plugins > API/Plugins/Paper2D
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- PAPER2UPaperTerrainComponent
References
| Module | Paper2D |
| Header | /Engine/Plugins/2D/Paper2D/Source/Paper2D/Classes/PaperTerrainComponent.h |
| Include | #include "PaperTerrainComponent.h" |
Syntax
UCLASS&40;BlueprintType, Experimental&41;
class PAPER2UPaperTerrainComponent : public UPrimitiveComponent
Remarks
The terrain visualization component for an associated spline component. This takes a 2D terrain material and instances sprite geometry along the spline path.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< class UPaperTerrainSplineComponent > | AssociatedSpline | ||
| bool | bClosedSpline | ||
| bool | bFilledSpline | ||
| TObjectPtr< class UBodySetup > | CachedBodySetup | Description of collision | |
| float | CollisionThickness | The extrusion thickness of collision geometry when using a 3D collision domain | |
| TArray< FPaperTerrainSpriteGeometry > | GeneratedSpriteGeometry | ||
| int32 | RandomSeed | Random seed used for choosing which spline meshes to use. | |
| int32 | ReparamStepsPerSegment | Number of steps per spline segment to place in the reparameterization table | |
| float | SegmentOverlapAmount | The overlap amount between segments | |
| TEnumAsByte< ESpriteCollisionMode::Type > | SpriteCollisionDomain | Collision domain (no collision, 2D (experimental), or 3D) | |
| FLinearColor | TerrainColor | The color of the terrain (passed to the sprite material as a vertex color) | |
| TObjectPtr< class UPaperTerrainMaterial > | TerrainMaterial | The terrain material to apply to this component (set of rules for which sprites are used on different surfaces or the interior) |
Constructors
| Type | Name | Description | |
|---|---|---|---|
PAPER2UPaperTerrainComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| void | GenerateCollisionDataFromPolygon
(
const TArray< FVector2D >& SplinePolyVertices2D, |
||
| void | GenerateFillRenderDataFromPolygon
(
const UPaperSprite* NewSprite, |
||
| FTransform | GetTransformAtDistance
(
float InDistance |
||
| void | InsertConvexCollisionDataFromPolygon
(
const TArray< FVector2D >& ClosedPolyVertices2D |
||
| void | |||
| void | SetTerrainColor
(
FLinearColor NewColor |
Set color of the terrain. | |
| void | SpawnSegments
(
const TArray< FTerrainSegment >& TerrainSegments, |
Overridden from UPrimitiveComponent
| Type | Name | Description | |
|---|---|---|---|
| FPrimitiveSceneProxy * | Creates a proxy to represent the primitive to the scene manager in the rendering thread. | ||
| UBodySetup * | GetBodySetup () |
Return the BodySetup to use for this PrimitiveComponent (single body case) |
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. |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| const UObject * | Give a readable name for this component, including asset name if applicable | ||
| void | OnRegister () |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. | |
| void | OnUnregister () |
Called when a component is unregistered. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | Handles reading, writing, and reference collecting using FArchive. |