Planar Engine
A 2D Game 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
Documentation
Components
Component | Description |
---|---|
AudioSource | Plays an audio. |
CameraController2D | Controls the behaviour of the 2D camera. |
Camera2D | Camera in 2D space. |
CharacterController2D | Provide basic character movement behaviour. |
SpriteRenderer | Renders sprite assets. |
Transform2D | Stores the position, rotation and scale of a 2D object. |
AudioSource
Plays an audio.
Fields
Name | Type | Description |
---|---|---|
Audio | AudioAsset Reference | The audio asset to be played. |
Loop | Bool | Whether playback should be looped. |
CameraController2D
Controls the behaviour of the 2D camera.
Fields
Name | Type | Description |
---|---|---|
Mode | Enum | Either free or track. |
HorizontalSpeed | Vector2 | Only applicable in free mode. Represents the left and right speed for the camera movement. |
VerticalSpeed | Vector2 | Only applicable in free mode. Represents the up and down speed for the camera movement. |
Transform | Transform Reference | Only applicable in track mode. Transform component used for tracking. |
HorizontalLerp | Float | Only applicable in track mode. Lerp factor in the horizontal direction. |
VerticalLerp | Float | Only applicable in track mode. Lerp factor in the vertical direction. |
See also
Camera2D
Camera in 2D space.
Fields
Name | Type | Description |
---|---|---|
PixelScale | Float | Number of pixels 1 unit represents. |
See also
CharacterController2D
Provide basic character movement behaviour.
Fields
Name | Type | Description |
---|---|---|
Speed | Float | Speed of character movement. |
EnableXFlip | Bool | Only applicable when there is a SpriteRenderer component on the same GameObject . Enables automatic flipping of the sprite depending on movement direction. |
InverseXFlip | Bool | Inverses the default flip direction of the sprite. |
SpriteRenderer
Renders sprite assets.
Fields
Name | Type | Description |
---|---|---|
Sprite | SpriteAsset Reference | The sprite used when rendering. |
FlipX | Bool | Flip the sprite horizontally. |
FlipY | Bool | Flip the sprite vertically. |
TileFactor | Vector2 | The number of times the sprite should be tiled. |
See also
Transform2D
Stores the position, rotation and scale of a 2D object.
Fields
Name | Type | Description |
---|---|---|
Position | Vector2 | Position in 2D space. |
Rotation | Float | Rotation in 2D space in degrees. |
Scale | Vector2 | Scale of the 2D object. |