Notion Database To Unity SO (Standalone)
A flexible system to import Notion databases into a Unity scriptable object for use in Unity game projects.
Description
A standalone copy of the Notion data module setup. The idea here is to provide the same setup from in the cart library, but as its own small asset that can be used without the rest of the library as its a really useful system in its own right. That and people may not want a whole code library for just one feature of it.
Features
- Download databases of any size.
- Apply sorting to data to order it just as it is in a Notion database view.
- Automatic parsing of data into their field types.
- Support for most useful Notion data properties.
- Automatic API key removal on build creation for security.
- System to reference assets in code without a direct inspector reference.
Supported Notion Database Property Types
Any string
convertible type should also support JSON for custom classes, but the mileage may vary. Best to just store raw data in these assets and convert the data with an override to the PostDataDownloaded()
method in the Notion Data Asset
.
Note that rollups are supported only when they show a property that is otherwise supported below:
Property type | Conversion types supported (Unity) |
---|---|
Title | string |
Text | string , NotionDataWrapper(GameObject(Prefab)/Sprite/AudioClip) |
Number | int, float , double , etc |
Toggle | bool |
Single-Select | string , enum |
Multi-Select | string[], List<string> , enum flags |
Rollup | Any supported from above types. |
Date | SerializableDateTime |