# Scene Objects

An **Object** in **Incari** is any entity which can be added to a **Scene**. "**Object**" is a broad term used to describe a number of different components, each with their own purpose, behaviors, and characteristics.

For in-depth descriptions of each type of **Object**, see the [**Table of Contents**](#contents) below.

## Managing Objects

**Objects** in a **Scene** are managed in the **Scene Outliner**. There they can be created, deleted, edited, and organized. For more detail, see the [**Scene Outliner**](https://docs.incari.com/incari-studio/2024.1/modules/scene-outliner) section.

![Objects in a Scene are managed in the Scene Outliner.](https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-d25efc993699198593971082d1b0d8b8c3957684%2Fmanagingobjects20232.png?alt=media)

## Attributes

**Attributes** define specific characteristics of entities in **Incari** and can be modified in the [**Attribute Editor**](https://docs.incari.com/incari-studio/2024.1/modules/attribute-editor). Particularly, there are several sets of **Attributes** that are shared throughout **Objects**. These are explained in detail in the [**Common Attributes**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/attributes/common-attributes) section:

* [`Object`](https://docs.incari.com/incari-studio/2024.1/objects-and-types/attributes/common-attributes/object): The `Name`, `Type`, and `Opacity` of an **Object** are shown here.
* [`Tag`](https://docs.incari.com/incari-studio/2024.1/objects-and-types/attributes/common-attributes/tag): *Metadata* that serves as an identifier for an **Object** or several of them.
* [`Sprite`](https://docs.incari.com/incari-studio/2024.1/objects-and-types/attributes/common-attributes/sprite): They determine how an **Object** is visualized in a **Scene**.
* [`Transformation`](https://docs.incari.com/incari-studio/2024.1/objects-and-types/attributes/common-attributes/transformation): They define the *position* and *rotation* of an **Object** in a **Scene**.

<div><figure><img src="https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-e721c120d3379f6838a11416ead5f8b402c2f1ed%2Fattri-object.png?alt=media" alt=""><figcaption><p>Object Attributes.</p></figcaption></figure> <figure><img src="https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-c33f8a1ce56c571d599207576b791eb527613fde%2Fattri-tag.png?alt=media" alt=""><figcaption><p>Tag Attributes.</p></figcaption></figure></div>

<div><figure><img src="https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-03cfbb504902db80ebbe3519f91da18741a25557%2Fattri-sprite.png?alt=media" alt=""><figcaption><p>Sprite Attributes.</p></figcaption></figure> <figure><img src="https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-15ceceb0a4c4c65db63d1150ae03067c94d6aa28%2Fattri-transformation.png?alt=media" alt=""><figcaption><p>Transformation Attributes.</p></figcaption></figure></div>

## Prefabs

**Prefabs** are an important and useful type of **Object**. They are composed of a combination of **Objects** and allow the user to create several **Instances** of this combination, enact changes across all of them, or apply individual characteristics via overrides. For more information, see the [**Prefabs**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/prefabs) section.

![Creating a Prefab.](https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-ef7d0500ebade52f27af411d723e32b24305777d%2Fsceneobjectsprefabsimage1.gif?alt=media)

## Objects in Logic

In the [**Logic**](https://docs.incari.com/incari-studio/2024.1/modules/logic-editor), it might be necessary to make references to specific **Objects**. For this, each **Object** in a **Scene** gets assigned an **Object ID**, which is a unique identifier. The **Object ID** of an **Object** can be obtained from said **Object's** **Node**, which is created by dragging an **Object** from the **Scene Outliner** to the **Logic Editor**.

For handling and modifying **Objects** in the **Logic**, there is a special category of [**Nodes**](https://docs.incari.com/incari-studio/2024.1/modules/logic-editor#nodes): the [**Object Nodes**](https://docs.incari.com/incari-studio/2024.1/toolbox/incari/object). These **Nodes** allow the user to obtain and set **Attribute** values for **Objects**, and they receive as input the **Object ID** of the target **Object**.

![Creating an Object Node.](https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-8e0c9df36974fb112f6990196216d69f9912b65c%2Fsceneobjectsobjectsinlogic.gif?alt=media)

## Structure in a Scene

**Objects** in a **Scene** are organized in a *tree*. This means that every **Object** except for the [**Root Object**](#root-object) has a *parent* and all **Objects** may have *children*.

The picture below shows an example. Here, `Object1` is the *parent* of `Object4` and `Object5`, `Object2` is the *parent* of `Object6`, and `Object3` has no *children*.

![](https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-597403064caaecae5cd4b7a115e60ddffae5d5a5%2Fstructureinscene20232.png?alt=media)

### Root Object

Every **Scene** has a **Root Object**, which is the *parent* of all **Objects** that are on the first hierarchy level. Thus, all **Objects** in a **Scene** are *descendants* of the **Root Object**. To obtain the **Object ID** of the **Root Object**, use the [**Get Root** **Node**](https://docs.incari.com/incari-studio/2024.1/toolbox/incari/object/get-root).

### Managing the Structure of Objects in a Scene

In the **Scene Outliner**, there are three ways to make an **Object** the child of another:

* Drag an existing **Object** and drop it on top of the **Object** that will be the *parent*.

![](https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-74454e394363deae7152421d95da04e7366d25a5%2Fsceneobjectsmanaging120232.gif?alt=media)

* Select the **Object** that will be the *parent* and create a new **Object** by clicking the plus ![](https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-55a9686264982a9e5bf290bb46e76f517453c193%2FplusIcon%20\(4\)%20\(4\)%20\(4\)%20\(4\)%20\(4\)%20\(4\)%20\(4\)%20\(4\)%20\(1\)%20\(1\)%20\(1\)%20\(2\).PNG?alt=media) icon on the top left and selecting the **Object** to create as a *child*.

![](https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-a1eb45257a1c88ca7003974e7abc54fa5b5e7674%2Fsceneobjectsmanaging220232.gif?alt=media)

* Right-click the **Object** that will be the *parent*, click on `Create` on the drop-down menu that appears and select the **Object** to create as a *child*.

![](https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-f8facd5fa8ccf5b24b813fb5dd7ea7780cf3cf0d%2Fsceneobjectsmanaging320232.gif?alt=media)

Moreover, **Objects** in the **Scene Outliner** can be dragged and dropped anywhere in the **Scene** structure, as can be seen in the following example:

![](https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-f5a588abc14c900233d7328bb1d751d2bb0f1f3b%2Fsceneobjectsmanaging420232.gif?alt=media)

### Nodes

There are a few **Nodes** that allow the user to obtain and use information about the structure of **Objects** in a **Scene**. These are:

* [**Get Children**](https://docs.incari.com/incari-studio/2024.1/toolbox/incari/object/get-children): Returns the *children* of an **Object**.
* [**Get Parent**](https://docs.incari.com/incari-studio/2024.1/toolbox/incari/object/get-parent): Returns the *parent* of an **Object**.
* [**Has Children**](https://docs.incari.com/incari-studio/2024.1/toolbox/incari/object/has-children): Returns a **Boolean** indicating whether an **Object** has *children*.

For more information about *trees*, visit the [Tree (data structure)](https://en.wikipedia.org/wiki/Tree_\(data_structure\)) page on *Wikipedia*.

## Contents

* [**Audio**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/audio)
* [**Camera**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/camera)
* [**Group**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/group)
* [**Image Sequence Sprite**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/imagesequencesprite)
* [**Label**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/label)
* [**Light**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/lights)
* [**List**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/list)
* [**Lottie Sprite**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/lottie-sprite)
* [**Mesh**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/mesh)
* [**On-Screen Keyboard**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/onscreenkeyboard)
* [**Overlay**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/overlay)
* [**Primitives**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/primitives)
* [**Sprite**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/sprite)
* [**Text**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/text)
* [**Vector**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/vector)
* [**Video**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/video)
* [**Web Sprite**](https://docs.incari.com/incari-studio/2024.1/objects-and-types/scene-objects/web-sprite)
