Version: 2021.3

SystemInfo.maxGraphicsBufferSize

切换到手册
public static long maxGraphicsBufferSize ;

描述

The maximum size of a graphics buffer (GraphicsBuffer, ComputeBuffer, vertex/index buffer, etc.) in bytes (Read Only).

Any GPU buffer (GraphicsBuffer, ComputeBuffer or a vertex/index buffer used by a Mesh) can not be larger than this amount of bytes.

using UnityEngine;

public class ExampleScript : MonoBehaviour { void Start() { // prints maximum graphics buffer size, in megabytes var maxSizeMb = SystemInfo.maxGraphicsBufferSize / 1024 / 1024; Debug.Log($"Maximum graphics buffer size is {maxSizeMb} MB"); } }