# SetName(Entity, FixedString64Bytes)

> Sets the name of an entity.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public void SetName(Entity entity, FixedString64Bytes name)
```

### Parameters

**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The Entity object of the entity to name.**** (\[FixedString64Bytes]\(/engine/7000.0/script-reference/unity/collections/fixedstring64bytes)): The name to assign. See remarks for caveats.

### Remarks

Note that any `System.String` names will implicitly cast to [FixedString64Bytes](/engine/7000.0/script-reference/unity/collections/fixedstring64bytes.md). This conversion will throw, rather than truncate, if over capacity (61 characters). Thus, ensure your names fit, or manually truncate them first (via [FixedStringMethods.CopyFromTruncated](/engine/7000.0/script-reference/unity/collections/fixedstringmethods/copyfromtruncated.md)).

However, GameObjects converted to entities (via Baking) will have long names silently truncated.

For performance, entity names only exist when running in the Unity Editor.
