Class RuleMatchSerializable
A Serializable class for storing Rule Match information for RuleEntityIdTile
Inherited Members
Namespace: Unity.Tilemaps.Experimental
Assembly: Unity.2D.Tilemap.Experimental.dll
Syntax
[BurstCompile]
[Serializable]
public class RuleMatchSerializable
Fields
colliderType
Collider Shape output for Tile
Declaration
public Tile.ColliderType colliderType
Field Value
| Type | Description |
|---|---|
| Tile.ColliderType |
enabled
Whether this Rule is enabled and used for matching
Declaration
public bool enabled
Field Value
| Type | Description |
|---|---|
| bool |
gameObjects
List of output GameObjects if Rule matches
Declaration
public List<GameObject> gameObjects
Field Value
| Type | Description |
|---|---|
| List<GameObject> |
groupId
Group to match with
Declaration
public int groupId
Field Value
| Type | Description |
|---|---|
| int |
matchingRules
List of Rules to match neighbors with
Declaration
public List<int> matchingRules
Field Value
| Type | Description |
|---|---|
| List<int> |
maxAnimationSpeed
Maximum range for Animation Speed
Declaration
public float maxAnimationSpeed
Field Value
| Type | Description |
|---|---|
| float |
minAnimationSpeed
Minimum range for Animation Speed
Declaration
public float minAnimationSpeed
Field Value
| Type | Description |
|---|---|
| float |
neighbors
List of neighbor positions to match with
Declaration
public List<Vector3Int> neighbors
Field Value
| Type | Description |
|---|---|
| List<Vector3Int> |
perlinScale
Perlin Scale for randomizing output
Declaration
public float perlinScale
Field Value
| Type | Description |
|---|---|
| float |
spriteOutput
Type of Sprite output by Tile
Declaration
public RuleMatchSerializable.OutputSprite spriteOutput
Field Value
| Type | Description |
|---|---|
| RuleMatchSerializable.OutputSprite |
sprites
List of output Sprites if Rule matches
Declaration
public List<Sprite> sprites
Field Value
| Type | Description |
|---|---|
| List<Sprite> |
tile
Tile to match with
Declaration
public TileBase tile
Field Value
| Type | Description |
|---|---|
| TileBase |
transformMatch
Transform rules to match neighbors with
Declaration
public RuleMatchSerializable.TransformMatch transformMatch
Field Value
| Type | Description |
|---|---|
| RuleMatchSerializable.TransformMatch |
Methods
GetBounds()
Gets the cell bounds of the TilingRule.
Declaration
public BoundsInt GetBounds()
Returns
| Type | Description |
|---|---|
| BoundsInt | Returns the cell bounds of the TilingRule. |
ToInput()
Converts the RuleMatch to a RuleMatchInput struct for use with Unity Jobs
Declaration
public RuleMatchInput ToInput()
Returns
| Type | Description |
|---|---|
| RuleMatchInput | RuleMatchInput struct |
ToInput(ref RuleMatchInput)
Copies the RuleMatch to a RuleMatchInput struct for use with Unity Jobs
Declaration
public void ToInput(ref RuleMatchInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| RuleMatchInput | input | RuleMatchInput to copy to |
ToOutput()
Converts the RuleMatch to a RuleMatchOutput struct for use with Unity Jobs
Declaration
public RuleMatchOutput ToOutput()
Returns
| Type | Description |
|---|---|
| RuleMatchOutput | RuleMatchOutput struct |
ToOutput(ref RuleMatchOutput)
Copies the RuleMatch to a RuleMatchOutput struct for use with Unity Jobs
Declaration
public void ToOutput(ref RuleMatchOutput output)
Parameters
| Type | Name | Description |
|---|---|---|
| RuleMatchOutput | output | RuleMatchOutput struct to copy to |