# AddSource(ConstraintSource)

> Adds a constraint source.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Animations](/engine/6000.6/script-reference/unityengine/animations.md)
* **Assembly:** UnityEngine.AnimationModule

```csharp
public int AddSource(ConstraintSource source)
```

### Parameters

**** (\[ConstraintSource]\(/engine/6000.6/script-reference/unityengine/animations/constraintsource)): The source object and its weight.

### Returns

| Type                                                       | Description                            |
| ---------------------------------------------------------- | -------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Returns the index of the added source. |
