# CopySerialized

> This is used by the code generator when a custom control is using the UxmlElementAttribute.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

## CopySerialized(Object)

This is used by the code generator when a custom control is using the [UxmlElementAttribute](/engine/6000.0/script-reference/unityengine/uielements/uxmlelementattribute.md).

```csharp
public static object CopySerialized(object value)
```

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)):&#x20;

### Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [Object](https://learn.microsoft.com/dotnet/api/system.object) |             |

## CopySerialized\<T>(Object)

This is used by the code generator when a custom control is using the [UxmlElementAttribute](/engine/6000.0/script-reference/unityengine/uielements/uxmlelementattribute.md).

```csharp
public static T CopySerialized<T>(object value)
```

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)):&#x20;

### Returns

| Type | Description |
| ---- | ----------- |
| T    |             |
