<!--
{
  "availability" : [
    "iOS: 7.0.0 - 10.0.0",
    "iPadOS: 7.0.0 - 10.0.0",
    "macOS: 10.8.0 - 10.12.0",
    "tvOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKUniform/init(name:float:)-9g6a7",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKUniform(im)initWithName:floatVector3:"
  },
  "title" : "init(name:float:)"
}
-->

# init(name:float:)

Creates and initializes a new uniform object that holds a vector of three floating-point numbers.

```
init(name: String, float value: GLKVector3)
```

## Parameters

`name`

The name used to identify the uniform variable; you use this name inside your shader to read the uniform variable’s value.

`value`

The initial vector for the uniform variable.

## Return Value

An initialized uniform object whose type is set to [`SKUniformType.floatVector3`](/documentation/SpriteKit/SKUniformType/floatVector3).

---

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)