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 : RuleOverrideTile
Fields
m_DefaultColliderType
The Default Collider Type set when creating a new Rule override.
Declaration
public Tile.ColliderType m_DefaultColliderType
Field Value
Type | Description |
---|---|
Tile.Collider |
m_DefaultGameObject
The Default GameObject set when creating a new Rule override.
Declaration
public GameObject m_DefaultGameObject
Field Value
Type | Description |
---|---|
Game |
m_DefaultSprite
The Default Sprite set when creating a new Rule override.
Declaration
public Sprite m_DefaultSprite
Field Value
Type | Description |
---|---|
Sprite |
m_OverrideTilingRules
A list of TilingRule Overrides
Declaration
public List<RuleTile.TilingRuleOutput> m_OverrideTilingRules
Field Value
Type | Description |
---|---|
List<Rule |
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 |
---|---|---|
Rule |
originalRule | The original TilingRule that is overridden |
Property Value
Type | Description |
---|---|
Rule |
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<Key |
overrides | A list of overrides to apply |
Exceptions
Type | Condition |
---|---|
Argument |
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<Key |
overrides | A list of overrides to fill |
int | validCount | Returns the number of valid overrides for Rules |
Exceptions
Type | Condition |
---|---|
Argument |
The input overrides list is not valid |
Override()
Updates the Rules with the Overrides set for this AdvancedRuleOverrideTile
Declaration
public override void Override()