# EntityGuid

> Initializes a new instance of the EntityGuid.

## Definition

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

## EntityGuid(int, int, uint, uint)

Initializes a new instance of the [EntityGuid](/engine/7000.0/script-reference/unity/entities/entityguid.md).

> **Warning:**
>
> **Removed.** EntityGuid(int originatingId, int originatingSubId, uint namespaceId, uint serial) is obsolete please use EntityGuid(EntityId originatingId, EntityId originatingSubId, uint namespaceId, uint serial) instead.

```csharp
public EntityGuid(int originatingId, int originatingSubId, uint namespaceId, uint serial)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Session-unique ID for the originating object. This is typically the authoring GameObject's InstanceID.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Secondary session-unique ID for the originating object. This is typically the authoring Component's InstanceID.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): A unique number to identify the namespace**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): A unique number used to differentiate Entities associated with the same originating object and namespace

## EntityGuid(EntityId, EntityId, uint, uint)

Initializes a new instance of the [EntityGuid](/engine/7000.0/script-reference/unity/entities/entityguid.md).

```csharp
public EntityGuid(EntityId originatingId, EntityId originatingSubId, uint namespaceId, uint serial)
```

### Parameters

**** (EntityId): Session-unique ID for the originating object. This is typically the authoring GameObject's EntityId.**** (EntityId): Secondary session-unique ID for the originating object. This is typically the authoring Component's EntityId.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): A unique number to identify the namespace**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): A unique number used to differentiate Entities associated with the same originating object and namespace
