# CrossFadeInFixedTime

> Creates a crossfade from the current state to any other state using times in seconds.

## Definition

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

## CrossFadeInFixedTime(string, float)

Creates a crossfade from the current state to any other state using times in seconds.

```csharp
public void CrossFadeInFixedTime(string stateName, float transitionDuration)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the state.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)):&#x20;

### Remarks

When you specify a state name, or the string used to generate a hash, it should include the name of the parent layer. For example, if you have a `Run` state in the `Base Layer`, the name is `Base Layer.Run`.

Additional Resources: [AnimatorControllerPlayable.CrossFade](/engine/6000.6/script-reference/unityengine/animations/animatorcontrollerplayable/crossfade.md) for normalized times.

## CrossFadeInFixedTime(string, float, int)

Creates a crossfade from the current state to any other state using times in seconds.

```csharp
public void CrossFadeInFixedTime(string stateName, float transitionDuration, int layer)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the state.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The layer where the crossfade occurs.

### Remarks

When you specify a state name, or the string used to generate a hash, it should include the name of the parent layer. For example, if you have a `Run` state in the `Base Layer`, the name is `Base Layer.Run`.

Additional Resources: [AnimatorControllerPlayable.CrossFade](/engine/6000.6/script-reference/unityengine/animations/animatorcontrollerplayable/crossfade.md) for normalized times.

## CrossFadeInFixedTime(string, float, int, float)

Creates a crossfade from the current state to any other state using times in seconds.

```csharp
public void CrossFadeInFixedTime(string stateName, float transitionDuration, int layer, float fixedTime)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the state.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The layer where the crossfade occurs.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)):&#x20;

### Remarks

When you specify a state name, or the string used to generate a hash, it should include the name of the parent layer. For example, if you have a `Run` state in the `Base Layer`, the name is `Base Layer.Run`.

Additional Resources: [AnimatorControllerPlayable.CrossFade](/engine/6000.6/script-reference/unityengine/animations/animatorcontrollerplayable/crossfade.md) for normalized times.

## CrossFadeInFixedTime(int, float)

Creates a crossfade from the current state to any other state using times in seconds.

```csharp
public void CrossFadeInFixedTime(int stateNameHash, float transitionDuration)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)):&#x20;

### Remarks

When you specify a state name, or the string used to generate a hash, it should include the name of the parent layer. For example, if you have a `Run` state in the `Base Layer`, the name is `Base Layer.Run`.

Additional Resources: [AnimatorControllerPlayable.CrossFade](/engine/6000.6/script-reference/unityengine/animations/animatorcontrollerplayable/crossfade.md) for normalized times.

## CrossFadeInFixedTime(int, float, int)

Creates a crossfade from the current state to any other state using times in seconds.

```csharp
public void CrossFadeInFixedTime(int stateNameHash, float transitionDuration, int layer)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The layer where the crossfade occurs.

### Remarks

When you specify a state name, or the string used to generate a hash, it should include the name of the parent layer. For example, if you have a `Run` state in the `Base Layer`, the name is `Base Layer.Run`.

Additional Resources: [AnimatorControllerPlayable.CrossFade](/engine/6000.6/script-reference/unityengine/animations/animatorcontrollerplayable/crossfade.md) for normalized times.

## CrossFadeInFixedTime(int, float, int, float)

Creates a crossfade from the current state to any other state using times in seconds.

```csharp
public void CrossFadeInFixedTime(int stateNameHash, float transitionDuration, int layer, float fixedTime)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): **** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The layer where the crossfade occurs.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)):&#x20;

### Remarks

When you specify a state name, or the string used to generate a hash, it should include the name of the parent layer. For example, if you have a `Run` state in the `Base Layer`, the name is `Base Layer.Run`.

Additional Resources: [AnimatorControllerPlayable.CrossFade](/engine/6000.6/script-reference/unityengine/animations/animatorcontrollerplayable/crossfade.md) for normalized times.
