# 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="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2FOaymXEseLlJpbv6SGfbo%2FsetCustomFolder.png?alt=media&#x26;token=05cddf0f-98b2-4bb9-a671-26b439b00483" 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="https://2348672745-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIoqF5QAgQsqxrjmTIKpE%2Fuploads%2FkuGzO1791DwQioIILcKf%2FsetCustomFolder2.png?alt=media&#x26;token=f82e7dd6-cbc2-46b6-a955-993f62dda043" 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{}
```
