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
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.ColliderType |
m_DefaultGameObject
The Default GameObject set when creating a new Rule override.
Declaration
public GameObject m_DefaultGameObject
Field Value
Type | Description |
---|---|
GameObject |
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<RuleTile.TilingRuleOutput> |
Properties
Item[RuleTile.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<RuleTile.TilingRule, RuleTile.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<RuleTile.TilingRule, RuleTile.TilingRuleOutput>>, ref Int32)
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 |
Int32 | 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()