Class AdvancedRuleOverrideTile
Rule Override Tiles are Tiles which can override a subset of Rules for a given Rule Tile to provide specialised behaviour while keeping most of the Rules originally set in the Rule Tile.
Inherited Members
Namespace: UnityEngine.Tilemaps
Assembly: Unity.2D.Tilemap.Extras.dll
Syntax
[MovedFrom(true, "UnityEngine", null, null)]
[Serializable]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.2d.tilemap.extras@latest/index.html?subfolder=/manual/RuleOverrideTile.html")]
public class AdvancedRuleOverrideTile : RuleOverrideTileFields
m_DefaultColliderType
The Default Collider Type set when creating a new Rule override.
Declaration
public Tile.ColliderType m_DefaultColliderTypeField Value
| Type | Description | 
|---|---|
| Tile.ColliderType | 
m_DefaultGameObject
The Default GameObject set when creating a new Rule override.
Declaration
public GameObject m_DefaultGameObjectField Value
| Type | Description | 
|---|---|
| GameObject | 
m_DefaultSprite
The Default Sprite set when creating a new Rule override.
Declaration
public Sprite m_DefaultSpriteField Value
| Type | Description | 
|---|---|
| Sprite | 
m_OverrideTilingRules
A list of TilingRule Overrides
Declaration
public List<RuleTile.TilingRuleOutput> m_OverrideTilingRulesField Value
| Type | Description | 
|---|---|
| List<RuleTile.TilingRuleOutput> | 
Properties
this[TilingRule]
Gets the overriding TilingRuleOutput of a given TilingRule.
Declaration
public RuleTile.TilingRuleOutput this[RuleTile.TilingRule originalRule] { get; set; }Parameters
| Type | Name | Description | 
|---|---|---|
| RuleTile.TilingRule | originalRule | The original TilingRule that is overridden | 
Property Value
| Type | Description | 
|---|---|
| RuleTile.TilingRuleOutput | 
Methods
ApplyOverrides(IList<KeyValuePair<TilingRule, TilingRuleOutput>>)
Applies overrides to this
Declaration
public void ApplyOverrides(IList<KeyValuePair<RuleTile.TilingRule, RuleTile.TilingRuleOutput>> overrides)Parameters
| Type | Name | Description | 
|---|---|---|
| IList<KeyValuePair<RuleTile.TilingRule, RuleTile.TilingRuleOutput>> | overrides | A list of overrides to apply | 
Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | The input overrides list is not valid | 
GetOverrides(List<KeyValuePair<TilingRule, TilingRuleOutput>>, ref int)
Gets overrides for this
Declaration
public void GetOverrides(List<KeyValuePair<RuleTile.TilingRule, RuleTile.TilingRuleOutput>> overrides, ref int validCount)Parameters
| Type | Name | Description | 
|---|---|---|
| List<KeyValuePair<RuleTile.TilingRule, RuleTile.TilingRuleOutput>> | overrides | A list of overrides to fill | 
| int | validCount | Returns the number of valid overrides for Rules | 
Exceptions
| Type | Condition | 
|---|---|
| ArgumentNullException | The input overrides list is not valid | 
Override()
Updates the Rules with the Overrides set for this AdvancedRuleOverrideTile
Declaration
public override void Override()