# Separate DataObjects

By default, Databrain organizes all DataObjects/ScriptableObjects inside its DataLibrary, keeping your project clean and uncluttered.\
If you prefer a different workflow, you can specify custom folders for DataObjects.

## Setup

1. Open Databrain Settings and select <mark style="background-color:orange;">DataObjects Folder</mark>.
2. Enable <mark style="background-color:orange;">Custom DataObjects Folder</mark> and set a global DataObject folder by clicking <mark style="background-color:orange;">Set Path</mark>.

<div align="left"><figure><img src="/files/FTJLT9sooIebBhIZqGQb" alt=""><figcaption></figcaption></figure></div>

{% hint style="success" %}
If you already have DataObjects inside the DataLibrary, you can move them to the global folder by clicking **Unparent all existing DataObjects to folder**.
{% endhint %}

## Custom Folders for Specific DataObject Types

You can assign different folders for specific DataObject types:

1. Select the DataObject type from the list.
2. At the bottom, click <mark style="background-color:orange;">Set Custom Folder Override</mark> to enable a custom folder for this type.
3. Click <mark style="background-color:orange;">Set Path</mark> to choose a different folder.

All existing DataObjects of this type will automatically move to the selected folder.

<div align="left"><figure><img src="/files/KQk6iNKx2bWJwuWswGiz" alt=""><figcaption></figcaption></figure></div>

## Reparent to DataLibrary

ou can move DataObjects back to the DataLibrary at any time by clicking <mark style="background-color:orange;">Parent all DataObjects to DataLibrary.</mark>

## Creating DataObjects outside the DataLibrary

Databrain can detect DataObjects created outside the Databrain Editor.\
To enable this feature:

* Ensure your **ScriptableObject** derives from **DataObject**.
* Add the following attribute to your class to create a menu entry in the **Project Create** context menu:

```csharp
// This will add an entry to the Project context menu.
// Right click in the project view and you'll see the entry Data / MyObject
[CreateAssetMenu(menuName = "Data/MyObject")]
public class MyObject : DataObject{}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://giantgrey.gitbook.io/databrain/separate-dataobjects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
