<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/MeshResource/generateSphere(radius:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation12MeshResourceC14generateSphere6radiusACSf_tFZ"
  },
  "title" : "generateSphere(radius:)"
}
-->

# generateSphere(radius:)

Creates a new sphere mesh with the specified radius.

```
@MainActor @preconcurrency static func generateSphere(radius: Float) -> MeshResource
```

## Parameters

`radius`

The radius, in meters, of the sphere.

## Return Value

A sphere mesh.

## Discussion

The sphere is centered at the entity’s origin.

---

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)