ES2Writer.Dispose
Description
Disposes of an ES2Writer.
If you are not using the ES2Writer in a using block, you should call this when you are finished with your writer.
C#
Saving tags to an ES2Writer
1 2 3 4 5 6 7 8 |
ES2Writer writer = ES2Writer.Create("myFile.txt"); // Write our data to the file. writer.Write(this.name, "nameTag"); writer.Write(this.transform, "transformTag"); writer.Write(new int[]{1,2,3},"intArrayTag"); // Remember to save when we're done. writer.Save(); writer.Dispose(); |
JS
Saving tags to an ES2Writer
1 2 3 4 5 6 7 8 |
var writer : ES2Writer = ES2Writer.Create("myFile.txt"); // Write our data to the file in the order we are going to read it. writer.Write(this.name, "nameTag"); writer.Write(this.transform, "transformTag"); writer.Write(new int[]{1,2,3}, "intArrayTag"); // Remember to save and dispose when you're finished. writer.Save(); writer.Dispose(); |