# implicit operator int

> Implicitly converts an EntityId to an integer.

## Definition

* **Type:** Operator
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## implicit operator int(Int3)

Implicitly converts an `EntityId` to an integer.

> **Warning:**
>
> **Removed.** EntityId will not be representable by an int in the future. This casting operator will be removed in a future version.

```csharp
public static implicit operator int(EntityId entityId)
```

### Parameters

**** (\[EntityId]\(/engine/6000.6/script-reference/unityengine/entityid)): The `EntityId` to convert.

### Returns

| Type                                                       | Description                                   |
| ---------------------------------------------------------- | --------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The integer representation of the `EntityId`. |

### Remarks

This operator is obsolete. To get the raw data of an `EntityId` as a `ulong`, use [EntityId.ToULong](/engine/6000.6/script-reference/unityengine/entityid/toulong.md) instead.

## implicit operator EntityId(EntityI)

Implicitly converts an integer to an `EntityId`.

> **Warning:**
>
> **Removed.** EntityId will not be representable by an int in the future. This casting operator will be removed in a future version.

```csharp
public static implicit operator EntityId(int intValue)
```

### Parameters

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

### Returns

| Type                                                                | Description                                             |
| ------------------------------------------------------------------- | ------------------------------------------------------- |
| [EntityId](/engine/6000.6/script-reference/unityengine/entityid.md) | An `EntityId` representing the specified integer value. |

### Remarks

This operator is obsolete and will be removed in a future version.
