<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" /> Navigation

</aside>

Home Page

Overview

World System

Subworld System

Ground Tile

Navigation

Resources

Interactions

Buildings

Player

Helpers

Enemies

Missions System

Editor Tools

Day Night & Weather System

Shaders, Effects, Optimization

Energy System

Input Configuration

UI Store

Monetization (Ads & IAP)

Ground Tile Overview

Untitled

Ground Tile is a building block of the in-game world. It’s the driving force behind game progression.

There are two states of the ground tile: opened and closed. It can be configured to be opened from the start or bought for some resources.

Ground Tile Prefab

Untitled

The root object in the hierarchy of the Ground Tile prefab has the GroundTileComplexBehavior Component attached to it.

There should be a child object with the GroundTileBehavior Component, and optionally children with PurchasePoint and ConstructionPoint Components.

Go to the Navigation block to learn how to configure navigation on the tile.

Ground Tile Complex Behavior Class

Untitled

GroundTileComplexBehavior class is responsible for unlocking the ground tile in the game.

It has the following fields:

  1. Id - auto-generated field for the save file.
  2. Unlockable - in this case it is the reference to the ground tile.
  3. Purchaser - the reference to the Purchase Point. It is responsible for getting resources from the player when they enter the collider and telling the Ground Tile Complex that the Ground Tile has been purchased. If this field is empty, the ground tile will be considered purchased, even if the IsOpenFromStart field is false and the Cost field is non-zero. These fields will be ignored.
  4. Construction Point - the reference to the Construction Point, that tells the Ground Tile Complex Behavior that the Ground Tile has been “constructed” (in this case it’s more like cleared from the obstacles, it depends on the type of interaction you have in mind for that specific tile).
  5. Is Open From Start - tells Ground Tile Complex Behavior to ignore Purchaser and Cost fields and consider the Ground Tile purchased.
  6. Cost - the list of resources the Player has to give to “purchase” the Ground Tile.

Ground Tile Behavior Class

Untitled

GroundTileBehavior class is the actual representation of the Ground Tile.

It has the following fields:

  1. Opened Visuals - the reference to the GameObject that will be disabled if the Ground Tile has not been purchased or constructed yet. Can be null.
  2. Closed Visuals - the reference to the GameObject that will be disabled when the Ground Tile is purchased and constructed. Can be null
  3. Unlock Animation - the specified animation for the opening of the tile.

How to add new Ground Tile prefab

To add a new ground tile prefab you will need visuals for the opened tile and optionally visuals for the closed tile.

The easiest way to add a new ground tile prefab is to clone an existing one with the matching functionality.

  1. If your new tile is always visible, with obstacles that get cleared when you open it, clone the “Land Tile Tall With Obstacle” prefab. And if you want a tile that appears from nowhere when you purchase it, clone the “Square Land Tile” prefab.
  2. Open the cloned prefab, and swap the visual files with your own.
  3. Make sure that the Mesh Renderer of the walkable ground has the Layer set to Ground.
  4. Don’t forget to assign new visual Game Objects to the appropriate fields of the Ground Tile Behavior Component.

Navigation

For the Ground Tile to be navigable it has to comply with the requirements detailed in the NavigationPage.