# Sandbox.GameObject.Clone

## Overload 1

```csharp
GameObject Clone(in CloneConfig cloneConfig)
```

Create a unique copy of the passed in GameObject

### Parameters

- `in cloneConfig` (`CloneConfig`)

### Returns

`GameObject`

## Overload 2

```csharp
static GameObject Clone(string prefabPath, System.Nullable<CloneConfig> config = null)
```

### Parameters

- `prefabPath` (`string`)
- `config` (`System.Nullable<CloneConfig>`), default `null`

### Returns

`GameObject`

## Overload 3

```csharp
static GameObject Clone(string prefabPath, Transform transform, GameObject parent = null, bool startEnabled = True, string name = null)
```

Clone a prefab from path

### Parameters

- `prefabPath` (`string`)
- `transform` (`Transform`)
- `parent` (`GameObject`), default `null`
- `startEnabled` (`bool`), default `True`
- `name` (`string`), default `null`

### Returns

`GameObject`

## Overload 4

```csharp
static GameObject Clone(PrefabFile prefabFile, System.Nullable<CloneConfig> config = null)
```

### Parameters

- `prefabFile` (`PrefabFile`)
- `config` (`System.Nullable<CloneConfig>`), default `null`

### Returns

`GameObject`

## Overload 5

```csharp
static GameObject Clone(PrefabFile prefabFile, Transform transform, GameObject parent = null, bool startEnabled = True, string name = null)
```

Clone a prefab from path

### Parameters

- `prefabFile` (`PrefabFile`)
- `transform` (`Transform`)
- `parent` (`GameObject`), default `null`
- `startEnabled` (`bool`), default `True`
- `name` (`string`), default `null`

### Returns

`GameObject`

## Overload 6

```csharp
GameObject Clone(Transform transform, GameObject parent = null, bool startEnabled = True, string name = null)
```

Create a unique copy of the GameObject

### Parameters

- `transform` (`Transform`)
- `parent` (`GameObject`), default `null`
- `startEnabled` (`bool`), default `True`
- `name` (`string`), default `null`

### Returns

`GameObject`

## Overload 7

```csharp
GameObject Clone()
```

Create a unique copy of the GameObject

### Returns

`GameObject`

## Overload 8

```csharp
GameObject Clone(Vector3 position)
```

Create a unique copy of the GameObject

### Parameters

- `position` (`Vector3`)

### Returns

`GameObject`

## Overload 9

```csharp
GameObject Clone(Vector3 position, Rotation rotation)
```

Create a unique copy of the GameObject

### Parameters

- `position` (`Vector3`)
- `rotation` (`Rotation`)

### Returns

`GameObject`

## Overload 10

```csharp
GameObject Clone(Vector3 position, Rotation rotation, Vector3 scale)
```

Create a unique copy of the GameObject

### Parameters

- `position` (`Vector3`)
- `rotation` (`Rotation`)
- `scale` (`Vector3`)

### Returns

`GameObject`

## Overload 11

```csharp
GameObject Clone(GameObject parent, Vector3 position, Rotation rotation, Vector3 scale)
```

Create a unique copy of the GameObject

### Parameters

- `parent` (`GameObject`)
- `position` (`Vector3`)
- `rotation` (`Rotation`)
- `scale` (`Vector3`)

### Returns

`GameObject`

Declared in [Sandbox.GameObject](/api/Sandbox.GameObject).
Assembly: `Sandbox.Engine`.
