# CreateOrUpdateSecondary

> Creates a new secondary tile or updates an existing one.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.WSA](/engine/7000.0/script-reference/unityengine/wsa.md)
* **Assembly:** UnityEngine.CoreModule

## CreateOrUpdateSecondary(SecondaryTileData)

Creates a new secondary tile or updates an existing one.

```csharp
public static Tile CreateOrUpdateSecondary(SecondaryTileData data)
```

### Parameters

**** (\[SecondaryTileData]\(/engine/7000.0/script-reference/unityengine/wsa/secondarytiledata)): The data to create or update the secondary tile with. You must set `tileId`. When you create a tile, you must also set `displayName`.

### Returns

| Type                                                            | Description                                                                         |
| --------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [Tile](/engine/7000.0/script-reference/unityengine/wsa/tile.md) | The tile that the method created or updated. Use it for further work with the tile. |

### Remarks

If a secondary tile with the same ID exists, the method updates it. You can't change the display name of an existing tile. If no tile with that ID exists, Windows shows a request to the user to pin the new tile to the Start screen, and creates the tile only if the user accepts.

## CreateOrUpdateSecondary(SecondaryTileData, Vector2)

Creates a new secondary tile or updates an existing one, and shows any pin request at a screen position.

```csharp
public static Tile CreateOrUpdateSecondary(SecondaryTileData data, Vector2 pos)
```

### Parameters

**** (\[SecondaryTileData]\(/engine/7000.0/script-reference/unityengine/wsa/secondarytiledata)): The data to create or update the secondary tile with. You must set `tileId`. When you create a tile, you must also set `displayName`.**** (\[Vector2]\(/engine/7000.0/script-reference/unityengine/vector2)): The screen coordinates to show the request at.

### Returns

| Type                                                            | Description                                                                         |
| --------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [Tile](/engine/7000.0/script-reference/unityengine/wsa/tile.md) | The tile that the method created or updated. Use it for further work with the tile. |

### Remarks

If a secondary tile with the same ID exists, the method updates it. You can't change the display name of an existing tile. If no tile with that ID exists, Windows shows a request to the user to pin the new tile to the Start screen, and creates the tile only if the user accepts. Windows shows the request at `pos`.

## CreateOrUpdateSecondary(SecondaryTileData, Rect)

Creates a new secondary tile or updates an existing one, and shows any pin request above a screen area.

```csharp
public static Tile CreateOrUpdateSecondary(SecondaryTileData data, Rect area)
```

### Parameters

**** (\[SecondaryTileData]\(/engine/7000.0/script-reference/unityengine/wsa/secondarytiledata)): The data to create or update the secondary tile with. You must set `tileId`. When you create a tile, you must also set `displayName`.**** (\[Rect]\(/engine/7000.0/script-reference/unityengine/rect)): The screen area to show the request above.

### Returns

| Type                                                            | Description                                                                         |
| --------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [Tile](/engine/7000.0/script-reference/unityengine/wsa/tile.md) | The tile that the method created or updated. Use it for further work with the tile. |

### Remarks

If a secondary tile with the same ID exists, the method updates it. You can't change the display name of an existing tile. If no tile with that ID exists, Windows shows a request to the user to pin the new tile to the Start screen, and creates the tile only if the user accepts. Windows shows the request above `area`.
