# GetOrCreateSystem

> Retrieve the handle for an instance of a system of type T from the current World. If the system does not exist in this World, it will first be created.

## Definition

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

## GetOrCreateSystem\<T>(World)

Retrieve the handle for an instance of a system of type `T` from the current World. If the system does not exist in this World, it will first be created.

```csharp
public static SystemHandle GetOrCreateSystem<T>(this World self) where T : unmanaged, ISystem
```

### Parameters

**** (\[World]\(/engine/7000.0/script-reference/unity/entities/world)): The World

### Returns

| Type                                                                           | Description                                                                                                                   |
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| [SystemHandle](/engine/7000.0/script-reference/unity/entities/systemhandle.md) | The instance's handle of system type `T` in this World. If the system does not exist in this World, it will first be created. |

### Remarks

**Important:** This function creates a sync point if a system is created, which means that the EntityManager waits for all currently running Jobs to complete before creating the system, and no additional Jobs can start before the function is finished. A sync point can cause a drop in performance because the ECS framework may not be able to make use of the processing power of all available cores.

## GetOrCreateSystem(World, Type)

Obsolete. Use [World.GetOrCreateSystem](/engine/7000.0/script-reference/unity/entities/world/getorcreatesystem.md) instead.

> **Warning:**
>
> **Deprecated.** Use World.GetOrCreateSystem instead

```csharp
public static SystemHandle GetOrCreateSystem(World self, Type unmanagedType)
```

### Parameters

**** (\[World]\(/engine/7000.0/script-reference/unity/entities/world)): The World**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)): The type.

### Returns

| Type                                                                           | Description |
| ------------------------------------------------------------------------------ | ----------- |
| [SystemHandle](/engine/7000.0/script-reference/unity/entities/systemhandle.md) |             |
