ドキュメント

Unity Engine

Unity Engine

SaveToFile(string)

Save GraphicsStateCollection to disk.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public bool SaveToFile(string filePath)

Parameters

filePath

Output location of GraphicsStateCollection serialized data.

Returns

Type

Description

boolReturns true if collection successfully saved, false otherwise.

Remarks

The file extension of GraphicsStateCollection is *.graphicsstate.

Examples

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); }}