Planar Engine

A 2D Game Engine.

Planar Engine

Getting Started

Guides

Opening Main Scene

Within the content window, double click on the Scenes folder. Locate the MainScene.planarscene file and double click to open.

Importing Sprites

Currently, only Portable Network Graphics (PNG) images are supported. Other image types will be added in the future.

Add image file to project

Using a file explorer, copy an image to the Textures folder in your project.

Create sprite asset

Navigate to the editor menu bar and click Asset > Asset Import. Once the asset import window is open, click Browse and select the image file previously copied. Next, click Import to create the sprite asset. An asset with the same name as the image with a .planarsprite extension will be created in that directory.

See also

SpriteRenderer

Documentation

Components

ComponentDescription
AudioSourcePlays an audio.
CameraController2DControls the behaviour of the 2D camera.
Camera2DCamera in 2D space.
CharacterController2DProvide basic character movement behaviour.
SpriteRendererRenders sprite assets.
Transform2DStores the position, rotation and scale of a 2D object.

AudioSource

Plays an audio.

Fields

NameTypeDescription
AudioAudioAsset ReferenceThe audio asset to be played.
LoopBoolWhether playback should be looped.

CameraController2D

Controls the behaviour of the 2D camera.

Fields

NameTypeDescription
ModeEnumEither free or track.
HorizontalSpeedVector2Only applicable in free mode. Represents the left and right speed for the camera movement.
VerticalSpeedVector2Only applicable in free mode. Represents the up and down speed for the camera movement.
TransformTransform ReferenceOnly applicable in track mode. Transform component used for tracking.
HorizontalLerpFloatOnly applicable in track mode. Lerp factor in the horizontal direction.
VerticalLerpFloatOnly applicable in track mode. Lerp factor in the vertical direction.

See also

Camera2D

Camera2D

Camera in 2D space.

Fields

NameTypeDescription
PixelScaleFloatNumber of pixels 1 unit represents.

See also

CameraController2D

CharacterController2D

Provide basic character movement behaviour.

Fields

NameTypeDescription
SpeedFloatSpeed of character movement.
EnableXFlipBoolOnly applicable when there is a SpriteRenderer component on the same GameObject. Enables automatic flipping of the sprite depending on movement direction.
InverseXFlipBoolInverses the default flip direction of the sprite.

SpriteRenderer

Renders sprite assets.

Fields

NameTypeDescription
SpriteSpriteAsset ReferenceThe sprite used when rendering.
FlipXBoolFlip the sprite horizontally.
FlipYBoolFlip the sprite vertically.
TileFactorVector2The number of times the sprite should be tiled.

See also

Importing Sprites

Transform2D

Stores the position, rotation and scale of a 2D object.

Fields

NameTypeDescription
PositionVector2Position in 2D space.
RotationFloatRotation in 2D space in degrees.
ScaleVector2Scale of the 2D object.