Class Tags
Gameplay tags utilities.
Inheritance
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public static class Tags : Object
Properties
List
List of all tags.
Declaration
[Unmanaged]
public static string[] List { get; }
Property Value
System.String[]
|
Methods
Find(String)
Gets the tag. Returns empty one if it doesn't exist.
Declaration
[Unmanaged]
public static Tag Find(string tagName)
Parameters
System.String
tagName
The tag name. |
Returns
Tag
The tag (might be empty). |
Get(String)
Gets or adds the tag.
Declaration
[Unmanaged]
public static Tag Get(string tagName)
Parameters
System.String
tagName
The tag name. |
Returns
Tag
The tag. |
GetSubTags(Tag)
Get all subtags of the specific Tag
Declaration
[Unmanaged]
public static Tag[] GetSubTags(Tag tag)
Parameters
Tag
tag
|
Returns
Tag[]
|
HasAll(Tag[], Tag[])
Checks if the list of tags contains all the given tags (including parent tags check). For example, HasAll({"A.B", "C"}, {"A", "C"}) returns true, for exact check use HasAllExact.
Declaration
public static bool HasAll(this Tag[] list, Tag[] tags)
Parameters
Tag[]
list
The tags list to use. |
Tag[]
tags
The tags to check. |
Returns
System.Boolean
True if all the given tags are contained by the list of tags. Returns true for empty list. |
HasAllExact(Tag[], Tag[])
Checks if the list of tags contains all the given tags (exact match). For example, HasAllExact({"A.B", "C"}, {"A", "C"}) returns false, for parents check use HasAll.
Declaration
public static bool HasAllExact(this Tag[] list, Tag[] tags)
Parameters
Tag[]
list
The tags list to use. |
Tag[]
tags
The tags to check. |
Returns
System.Boolean
True if all the given tags are contained by the list of tags. Returns true for empty list. |
HasAny(Tag[], Tag[])
Checks if the list of tags contains any of the given tags (including parent tags check). For example, HasAny({"A.B", "C"}, {"A"}) returns true, for exact check use HasAnyExact.
Declaration
public static bool HasAny(this Tag[] list, Tag[] tags)
Parameters
Tag[]
list
The tags list to use. |
Tag[]
tags
The tags to check. |
Returns
System.Boolean
True if any of of the given tags is contained by the list of tags. |
HasAnyExact(Tag[], Tag[])
Checks if the list of tags contains any of the given tags (exact match). For example, HasAnyExact({"A.B", "C"}, {"A"}) returns false, for parents check use HasAny.
Declaration
public static bool HasAnyExact(this Tag[] list, Tag[] tags)
Parameters
Tag[]
list
The tags list to use. |
Tag[]
tags
The tags to check. |
Returns
System.Boolean
True if any of the given tags is contained by the list of tags. |
HasTag(Tag[], Tag)
Checks if the list of tags contains a given tag (including parent tags check). For example, HasTag({"A.B"}, "A") returns true, for exact check use HasTagExact.
Declaration
public static bool HasTag(this Tag[] list, Tag tag)
Parameters
Tag[]
list
The tags list to use. |
Tag
tag
The tag to check. |
Returns
System.Boolean
True if given tag is contained by the list of tags. Returns false for empty list. |
HasTagExact(Tag[], Tag)
Checks if the list of tags contains a given tag (exact match). For example, HasTag({"A.B"}, "A") returns false, for parents check use HasTag.
Declaration
public static bool HasTagExact(this Tag[] list, Tag tag)
Parameters
Tag[]
list
The tags list to use. |
Tag
tag
The tag to check. |
Returns
System.Boolean
True if given tag is contained by the list of tags. Returns false for empty list. |