Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Varying

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/graphics/MeshSpecification.Varying "View this page in Java")

```
open class Varying
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.graphics.MeshSpecification.Varying](https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification.Varying#) |

Data class to represent a single varying variable. A Varying variable can be altered by the vertex shader defined on the mesh but not by the fragment shader defined by AGSL. See https://developer.android.com/develop/ui/views/graphics/agsl for more information regarding Android Graphics Shader Language. This is consumed as part of `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification#make(kotlin.Array,%20kotlin.Int,%20kotlin.Array,%20kotlin.String,%20kotlin.String,%20android.graphics.ColorSpace,%20kotlin.Int)` to create a `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification` instance.

## Summary

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification.Varying#Varying(kotlin.Int,%20kotlin.String)(type: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html, name: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` <br /> |

| Public methods ||
|---|---|
| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification.Varying#getName()()` Return the name of this `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification.Varying#` |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification.Varying#getType()()` Return the corresponding data type for this `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification.Varying#`. |
| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification.Varying#toString()()` Returns a string representation of the object. |

## Public constructors

### Varying

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
Varying(
    type: Int, 
    name: String)
```

| Parameters ||
|---|---|
| `type` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Value is one of the following: - `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT2:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT3:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT4:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification#TYPE_UBYTE4:kotlin.Int` |
| `name` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |

## Public methods

### getName

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
open fun getName(): String
```

Return the name of this `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification.Varying#`

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | This value cannot be `null`. |

### getType

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
open fun getType(): Int
```

Return the corresponding data type for this `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification.Varying#`.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | Value is one of the following: - `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT2:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT3:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification#TYPE_FLOAT4:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/graphics/MeshSpecification#TYPE_UBYTE4:kotlin.Int` |

### toString

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

```
open fun toString(): String
```

Returns a string representation of the object.

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | a string representation of the object. |