ドキュメント

Unity Engine

Unity Engine

GetAllocatedMemoryForGraphicsDriver()

Returns the estimated amount of allocated memory for the graphics driver, in bytes.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public static long GetAllocatedMemoryForGraphicsDriver()

Returns

Type

Description

longEstimated used graphics memory in bytes. Returns 0 in Release Players.

Remarks

Use to obtain a value of the graphics memory used by all allocated graphics resources such as textures, meshes, compute and geometry buffers. The value is estimated based on the properties of created graphics resources which are allocated using graphics scripting API as well as internal graphics resources used by the Unity engine.
Note: Only available in development players and the Unity Editor.
using UnityEngine;using UnityEngine.Profiling;public class ExampleClass : MonoBehaviour{ void Update() { Debug.Log("Estimated used graphics memory: " + Profiler.GetAllocatedMemoryForGraphicsDriver() + " Bytes"); }}