Getting Started
Welcome to Nova! This guide aims to provide some basic information about using Nova in your own project as well as point you in the right direction to learn more about specific features or topics.
Creating Content
UIBlocks
All content in Nova is made up of UIBlocks, which are Nova's building blocks (hence the name, UIBlock). There are a few types of UIBlocks, each of which can be used for specific types of content:
Icon | Type | Description |
---|---|---|
![]() |
UIBlock | Non-visual base type for all other UIBlocks useful for hierarchical purposes or sizing, positioning, and laying out other content. |
![]() |
UIBlock2D | Renders 2D content such as images, gradients, borders, drop shadows, and more. |
![]() |
TextBlock | Renders text. |
![]() |
UIBlock3D | Renders 3D, volumetric content such as rounded-corner cubes, spheres, cylinders, capsules, and more. |
Adding UIBlocks is as simple as right-clicking in the hierarchy window and selecting Nova > UIBlock 2D
(or alternatively with the Add Component
menu to add to an existing GameObject).
Screen Space vs. World Space
Nova supports flexible configurations for rendering UIs in both screen space and world space.
The easiest way to setup your Nova project for screen-space is by adding a ScreenSpace component to the UIBlock root of your UI.
To get started with building your UI for world-space, simply add UIBlocks to your scene and position them where you would like -- it's that simple!
To learn more about how Nova content is rendered, see the Screen vs. World Space article.
API Usage
With few exceptions, the API for modifying UIBlocks is made up of get
-properties which return the type of the property by ref
. This allows direction modification and manipulation of the returned type without requiring a reassignment.
For example, even though the type of the Border property on the UIBlock2D is a struct
, you can see in the following example usage on the right that the properties of the returned Border can be modified directly.
Property Declaration:
public ref Border Border { get; }
Example Usage:
// Constructs a new Border and assigns it
uiBlock.Border = new Border(Color.white, Length.FixedValue(1));
// Sets the border width to be 10%
uiBlock.Border.Width.Percent = 0.1f;
// Makes the border expand outward
uiBlock.Border.Direction = BorderDirection.Out;