---
description: Node description and basic instructions
---

# Instantiate

### Description

Clones the object original and returns the clone.

This function makes a copy of an object in a similar way to the Duplicate command in the editor. If you are cloning a GameObject you can specify its position and rotation (these default to the original GameObject's position and rotation otherwise). If you are cloning a Component the GameObject it is attached to is also cloned, again with an optional position and rotation.

When you clone a GameObject or Component, all child objects and components are also cloned with their properties set like those of the original object.

{% hint style="danger" %}
When this method clones a child object, it also clones the child's own children. To prevent stack overflow, Unity limits this nested cloning. If you exceed more than half your stack size, Unity throws an InsufficientExecutionStackException.
{% endhint %}

By default the parent of the new object is null; it is not a "sibling" of the original. If a parent is specified and no position and rotation are specified, the original object's position and rotation are used for the cloned object's local position and rotation. If the position and rotation are specified, they are used as the object's position and rotation in world space.

The active status of a GameObject at the time of cloning is maintained, so if the original is inactive the clone is created in an inactive state too.

These methods do not create a prefab connection to the new instantiated object. Creating objects with a prefab connection can be achieved using Instantiate Prefab.

**To create it**, right-click on free space in AI Tree inspector and select <mark style="color:purple;">Create Node/Tasks/Object/Object.</mark>

This task node has a number of fields, that are highlighted in picture below.

<figure><img src="https://2203000093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGOxTM7Aj9oiVaIINrEkE%2Fuploads%2FKW1wV3gfk3YyXU6msXWh%2FObj2.png?alt=media&#x26;token=0dbe4591-d4ec-4ebc-a4d6-4715342bf426" alt=""><figcaption></figcaption></figure>

### Fields

| Name                  | Description                            |
| --------------------- | -------------------------------------- |
| Node Name             | Name of node                           |
| Ignore About Self     | Whether node ignores abort self or not |
| Object To Instantiate | Target you want to destroy             |
| Position              | Position of the cloned object          |
| Rotation              | Rotation of the cloned object          |
| Parent                | Parent of cloned object                |
