---
title: "Instantiate"
content_type: tutorial
url: "https://learn.unity.com/tutorial/instantiate?language=en"
language: en
difficulty: beginner
duration_minutes: 5
unity_version:
  - "2021.3"
supported_unity_versions:
  - name: "2021.3"
    url: "https://learn.unity.com/tutorial/instantiate.md?language=en&version=2021.3"
available_languages:
  - name: "en"
    url: "https://learn.unity.com/tutorial/instantiate.md?language=en"
  - name: "es"
    url: "https://learn.unity.com/tutorial/ejemplificar.md?language=es"
  - name: "ja"
    url: "https://learn.unity.com/tutorial/instantiate-insutansuhua.md?language=ja"
  - name: "ko"
    url: "https://learn.unity.com/tutorial/inseuteonseuhwa.md?language=ko"
  - name: "zh-cn"
    url: "https://learn.unity.com/tutorial/instantiate-1.md?language=zh-cn"
last_updated: "2026-10-07T22:10:49.000Z"
---

# Instantiate

Learn to use Instantiate to clone prefabs at runtime as part of the Beginner Scripting project.

How to use Instantiate to create clones of a Prefab during runtime.

Previous: [Classes](https://learn.unity.com/tutorial/classes-5?projectId=5c8920b4edbc2a113b6bc26a)

Next: [Arrays](https://learn.unity.com/tutorial/arrays-9o?projectId=5c8920b4edbc2a113b6bc26a)

## 1. Instantiate

[Video](https://connect-mediagw.unity.com/h1/20220104/videos/5bb22943-c73f-459b-81ce-0d9ffadbfeab_U_Beginner_22_Instantiate.mp4)

## **UsingInstantiate**

```csharp
using UnityEngine;
using System.Collections;

public class UsingInstantiate : MonoBehaviour
{
    public Rigidbody rocketPrefab;
    public Transform barrelEnd;
    
    
    void Update ()
    {
        if(Input.GetButtonDown("Fire1"))
        {
            Rigidbody rocketInstance;
            rocketInstance = Instantiate(rocketPrefab, barrelEnd.position, barrelEnd.rotation) as Rigidbody;
            rocketInstance.AddForce(barrelEnd.forward * 5000);
        }
    }
}
```

## **RocketDestruction**

```csharp
using UnityEngine;
using System.Collections;

public class RocketDestruction : MonoBehaviour
{
    void Start()
    {
        Destroy (gameObject, 1.5f);
    }
}
```
