Skip to main content

CellData

CellData : ScriptableObject

The base class for storing cell data. Instances of this will be saved in the CellDataStore.

Modify this class or derive from it to store your custom data (see tutorial).

Properties​

Public​

Name
Type
Description
pathfindingCellPathfindingDataPathfinding data of the cell
uniformboolIf true, all tiles with this CellData point to one single instance. Can be used to save memory.

Public methods​

GetPosition​

public Vector3Int GetPosition()

Returns the grid position of the cell.

note

Only works when CellData is not uniform, i.e. when each tile has its own CellData instance.


CreateInstance​

public CellData CreateInstance(Vector3Int pos)

Creates and returns a new instance of the scriptable object. For example, this method is called when populating the cell data store.