<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKLinearCongruentialRandomSource/seed",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKLinearCongruentialRandomSource(py)seed"
  },
  "title" : "seed"
}
-->

# seed

The seed value that determines the random source’s behavior.

```
var seed: UInt64 { get set }
```

## Discussion

Any two random sources initialized with the same seed value will generate the same sequence of random numbers. To replicate the behavior of an existing [`GKLinearCongruentialRandomSource`](/documentation/GameplayKit/GKLinearCongruentialRandomSource) instance, read this property and then create a new instance by passing the resulting value to the [`init(seed:)`](/documentation/GameplayKit/GKLinearCongruentialRandomSource/init(seed:)) initializer.

For a source of high-entropy seed data, see the <doc://com.apple.documentation/documentation/Security/SecRandomCopyBytes(_:_:_:)> function.

---

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)