ES2Reader.TagExists
public bool TagExists(string tag)
Parameters
[table th=”0″]tag,”The tag we want to check the existence of in our ES2Reader.”[/table]
Returns
[table th=”0″]bool,”True or False, depending on whether tag exists.”[/table]
Description
Checks if the specified tag exists in this ES2Reader.
C#
// Check that a file named 'myFile.txt' contains a tag named 'myPosition' before loading it. using(ES2Reader reader = ES2Reader.Create("myFile.txt")) { if(reader.TagExists("myPosition")) transform.position = reader.Read<Vector3>("myPosition"); }
JS
// Check that a file named 'myFile.txt' contains a tag named 'myPosition' before loading it. var reader : ES2Reader = ES2Reader.Create("myFile.txt"); if(reader.TagExists("myPosition")) transform.position = reader.Read.<Vector3>("myPosition"); reader.Dispose();