Version: 2023.2

SystemInfo.maxGraphicsBufferSize

切换到手册
public static long maxGraphicsBufferSize ;

描述

图形缓冲区的最大大小(GraphicsBufferComputeBuffer、顶点/索引缓冲区等),以字节为单位(只读)。

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