Class EntityIdTileBase
Base abstract class for all Entity Id Tiles used by a Tilemap. In order for a custom Tile to use Unity Jobs and Burst by a Tilemap, the custom Tile must be derived from EntityIdTileBase or other Tiles which derive from EntityIdTileBase.
Inherited Members
Namespace: Unity.Tilemaps
Assembly: Unity.2D.Tilemap.Runtime.dll
Syntax
[BurstCompile]
[DefaultExecutionOrder(-100)]
[MovedFrom(true, "Unity.Tilemaps.Experimental", "Unity.2D.Tilemap.Experimental", null)]
public abstract class EntityIdTileBase : TileBase
Properties
getTileAnimationDataJobDelegate
Returns the delegate function called by Tilemap using Unity Jobs to get Tile Animation Data from Tiles of this type
Declaration
protected abstract EntityIdTileBase.GetTileAnimationDataJobDelegate getTileAnimationDataJobDelegate { get; }
Property Value
| Type | Description |
|---|---|
| EntityIdTileBase.GetTileAnimationDataJobDelegate |
getTileAnimationDataJobFunction
Returns the Burst Compiler compiled function pointer for the Tile's getTileAnimationDataJobDelegate
Declaration
public FunctionPointer<EntityIdTileBase.GetTileAnimationDataJobDelegate> getTileAnimationDataJobFunction { get; }
Property Value
| Type | Description |
|---|---|
| FunctionPointer<EntityIdTileBase.GetTileAnimationDataJobDelegate> |
getTileDataJobDelegate
Returns the delegate function called by Tilemap using Unity Jobs to get Tile Data from Tiles of this type
Declaration
protected abstract EntityIdTileBase.GetTileDataJobDelegate getTileDataJobDelegate { get; }
Property Value
| Type | Description |
|---|---|
| EntityIdTileBase.GetTileDataJobDelegate |
getTileDataJobFunction
Returns the Burst Compiler compiled function pointer for the Tile's getTileDataJobDelegate
Declaration
public FunctionPointer<EntityIdTileBase.GetTileDataJobDelegate> getTileDataJobFunction { get; }
Property Value
| Type | Description |
|---|---|
| FunctionPointer<EntityIdTileBase.GetTileDataJobDelegate> |
maxRefreshExtent
The maximum distance, per axis, from a cell to any position this Tile may refresh when that cell is refreshed. Tilemap uses this to size the bounding box of the region a refresh can touch. It must be an upper bound on the absolute offset of any refreshed position from the cell. Override this if the Tile refreshes positions other than its own.
Declaration
public virtual int3 maxRefreshExtent { get; }
Property Value
| Type | Description |
|---|---|
| int3 |
maxRefreshPositionCount
The maximum number of positions this Tile may add to the refresh buffer for each cell it occupies when refreshed. Tilemap uses this to preallocate the refresh position buffer for Unity Jobs. It is derived from maxRefreshExtent as the number of cells in the neighbourhood box the refresh can touch, which is an upper bound on the positions the Tile's refresh delegate can write per cell. Override maxRefreshExtent rather than this if the Tile refreshes positions other than its own.
Declaration
public int maxRefreshPositionCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
refreshTileJobDelegate
Returns the delegate function called by Tilemap using Unity Jobs to refresh Tiles of this type
Declaration
protected abstract EntityIdTileBase.RefreshTileJobDelegate refreshTileJobDelegate { get; }
Property Value
| Type | Description |
|---|---|
| EntityIdTileBase.RefreshTileJobDelegate |
refreshTileJobFunction
Returns the Burst Compiler compiled function pointer for the Tile's refreshTileJobDelegate
Declaration
public FunctionPointer<EntityIdTileBase.RefreshTileJobDelegate> refreshTileJobFunction { get; }
Property Value
| Type | Description |
|---|---|
| FunctionPointer<EntityIdTileBase.RefreshTileJobDelegate> |
structType
Returns the type of data struct used for this EntityIdTileBase
Declaration
public abstract Type structType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
Methods
CopyDataStruct(Tilemap, void*)
Copies the data struct used for this EntityIdTileBase to the outPtr buffer for use in Unity Jobs.
Declaration
public abstract void CopyDataStruct(Tilemap tilemap, void* outPtr)
Parameters
| Type | Name | Description |
|---|---|---|
| Tilemap | tilemap | The Tilemap the data struct is copied for. |
| void* | outPtr | Data buffer to copy data struct from EntityIdTileBase to. |
OnEnable()
Initialises the EntityIdTileBase. If a Tile is derived from EntityIdTileBase and overrides OnEnable, it must call base.OnEnable in the overriden OnEnable
Declaration
public override void OnEnable()