filePath | Output location of GraphicsStateCollection serialized data. |
bool Returns true if collection successfully saved, false otherwise.
Save GraphicsStateCollection to disk.
The file extension of GraphicsStateCollection is *.graphicsstate.
using UnityEngine; using UnityEngine.Experimental.Rendering;
public class SaveToFileExample : MonoBehaviour { public GraphicsStateCollection graphicsStateCollection; public string filePath;
void Start() { graphicsStateCollection = new GraphicsStateCollection(); graphicsStateCollection.BeginTrace(); }
void OnDestroy() { graphicsStateCollection.EndTrace(); graphicsStateCollection.SaveToFile(filePath); } }