The options for the default GPU buffer target that Unity applies to the vertex and index buffers of meshes.
Use this enum with EditorGraphicsSettings.defaultMeshBufferTarget to control whether Unity applies an additional buffer target to the GPU buffers it creates for meshes.
On platforms that don’t support compute access, Unity doesn’t add any additional targets.
Additional resources: EditorGraphicsSettings.defaultMeshBufferTarget, Mesh.GetVertexBuffer, Mesh.GetIndexBuffer, Target.
using UnityEditor; using UnityEditor.Rendering; using UnityEngine; public static class DefaultMeshBufferTargetExample { [MenuItem("Example/Create Mesh Buffers With Raw Access")] static void CreateMeshBuffersWithRawAccess() { // Create the vertex and index buffers of every mesh with raw access, // so compute shaders can access mesh data by default. EditorGraphicsSettings.defaultMeshBufferTarget = DefaultMeshBufferTarget.Raw; Debug.Log($"Default mesh buffer target: {EditorGraphicsSettings.defaultMeshBufferTarget}"); } }