# SetData

> Sets data for the OnModifyAndroidProjectFiles callback.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Android](/engine/6000.5/script-reference/unityeditor/android.md)
* **Assembly:** UnityEditor.Android.Extensions

## SetData(string, string)

Sets data for the OnModifyAndroidProjectFiles callback.

```csharp
public void SetData(string key, string value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Data key.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Data value as string.

### Remarks

This method is used to set data from the Unity Editor and it is passed to the `OnModifyAndroidProjectFiles` callback.

If data with the same key already exists, Unity throws an error.

## SetData\<T>(string, T)

Sets data as serializable object.

```csharp
public void SetData<T>(string key, T value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Data key.**** (T): Serializable object.

### Remarks

This method is used to set data from the Unity Editor and it is passed to the `OnModifyAndroidProjectFiles` callback.

If data with the same key already exists, Unity throws an error.
