# SetField

> Sets a field value and alias.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Search](/engine/6000.7/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

## SetField(string, Object)

Sets a field value and alias.

```csharp
public void SetField(string name, object value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Field name.**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): Value to be set.

## SetField(string, string, Object)

Sets a field value and alias.

```csharp
public void SetField(string name, string alias, object value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Field name.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Alias to be given to the field.**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): Value to be set.
