기술 자료

Unity Engine

Unity Engine

SaveToFile(string)

Save GraphicsStateCollection to disk.
읽는 시간 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); }}