# Runtime gameobjects

## Overview

Runtime gameobjects are great way to store, categorize and identify groups of gameobjects during runtime.&#x20;

{% embed url="<https://youtu.be/P6-VktwCWrA>" %}

This feature uses 3 components:

* The Runtime GameObject Scriptable Asset
* The Add Runtime GameObject component
* The Get Runtime GameObject component

## Runtime GameObject Asset

This asset is in charge to store all the gameobjects that are set at runtime.

![](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-MaR0qvCi2cXzx-7lxzc%2F-MaR3Dyb_WXUSqI1NdEx%2Fimage.png?alt=media\&token=2358cfa5-b3e2-428e-9447-1a456b357a25)

## Add Runtime Gameobjects

<figure><img src="https://963537199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lzhr1XSMzMqNXjRnNlb%2Fuploads%2F2CsPYlzPv1AIyl86EdXJ%2Fimage.png?alt=media&#x26;token=c7938e68-4dd3-4404-85f6-888a81f568a3" alt=""><figcaption></figcaption></figure>

When this component is added to a gameobject, it will add to the given runtime set, that gameobject on Enable.

### Parameters

#### Collection

&#x20;Runtime Set to add the gameobject that has the component

## Get Runtime Gameobjects

<figure><img src="https://963537199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lzhr1XSMzMqNXjRnNlb%2Fuploads%2FzSYuPV1HpPLieDmOMyJj%2Fimage.png?alt=media&#x26;token=adcdcce7-cf08-417d-93be-6c293fd24368" alt=""><figcaption></figcaption></figure>

When this component is added to a gameobject, it will find an item in a Runtime Object collection set and it will use Unity Events to connect the result to any other component.
