<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/LowLevelBufferSlice/init(buffer:offset:size:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:19RealityCoreRenderer19LowLevelBufferSliceV6buffer6offset4sizeAcA0deF8ResourceC_S2itAA0dE18RenderContextErrorVYKcfc"
  },
  "title" : "init(buffer:offset:size:)"
}
-->

# init(buffer:offset:size:)

Creates a slice referencing a sub-range of the given buffer.

```
init(buffer: LowLevelBufferResource, offset: Int, size: Int) throws(LowLevelRenderContextError)
```

## Parameters

`buffer`

The buffer this slice references.

`offset`

The byte offset into `buffer` at which this slice begins.

`size`

The size of this slice, in bytes.

## Discussion> Throws: ``doc://com.apple.RealityKit/documentation/RealityKit/LowLevelRenderContextError`` if `offset` or `size` fall outside the buffer’s allocated capacity.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)