# ConnectInput

> Connect the output port of a Playable to one of the input ports.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Playables](/engine/6000.5/script-reference/unityengine/playables.md)
* **Assembly:** UnityEngine.CoreModule

## ConnectInput\<T, U>(T, int, T, int)

Connect the output port of a [Playable](/engine/6000.5/script-reference/unityengine/playables/playable.md) to one of the input ports.

```csharp
public static void ConnectInput<U, V>(this U playable, int inputIndex, V sourcePlayable, int sourceOutputIndex) where U : struct, IPlayable where V : struct, IPlayable
```

### Parameters

**** (T): The [Playable](/engine/6000.5/script-reference/unityengine/playables/playable.md) used by this operation.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The input port index.**** (T): The [Playable](/engine/6000.5/script-reference/unityengine/playables/playable.md) to connect to.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The output port of the [Playable](/engine/6000.5/script-reference/unityengine/playables/playable.md).

### Remarks

This method is a simple helper on top of [PlayableGraph.Connect](/engine/6000.5/script-reference/unityengine/playables/playablegraph/connect.md).

Use this templated extension method on any type that inherits from [IPlayable](/engine/6000.5/script-reference/unityengine/playables/iplayable.md).

## ConnectInput\<T, U>(T, int, T, int, float)

Connect the output port of a [Playable](/engine/6000.5/script-reference/unityengine/playables/playable.md) to one of the input ports.

```csharp
public static void ConnectInput<U, V>(this U playable, int inputIndex, V sourcePlayable, int sourceOutputIndex, float weight) where U : struct, IPlayable where V : struct, IPlayable
```

### Parameters

**** (T): The [Playable](/engine/6000.5/script-reference/unityengine/playables/playable.md) used by this operation.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The input port index.**** (T): The [Playable](/engine/6000.5/script-reference/unityengine/playables/playable.md) to connect to.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The output port of the [Playable](/engine/6000.5/script-reference/unityengine/playables/playable.md).**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The weight of the input port.

### Remarks

This method is a simple helper on top of [PlayableGraph.Connect](/engine/6000.5/script-reference/unityengine/playables/playablegraph/connect.md).

Use this templated extension method on any type that inherits from [IPlayable](/engine/6000.5/script-reference/unityengine/playables/iplayable.md).
