Databrain Documentation
databrain.ccDiscord
  • Welcome
  • Installation / Update
  • Interface
  • DataObject Property Drawer
    • No GUI Implemented - FIX
  • Getting started
  • Guides
    • Add data objects
    • Add data objects at runtime
    • Get initial data
    • Get/Set runtime data
    • Serialize DataObjects
    • Runtime Save & Load
    • Use custom serializer
    • Import
    • Search
    • Custom GUI
    • Custom GUI with Odin Inspector
    • Hierarchy Template
  • Separate DataObjects
  • Using Version Control
  • Attributes
    • DataObject attributes
    • Field attributes
  • API
    • DataLibrary
    • DataObject
  • FAQ
    • Databrain - FAQ
  • Add-ons
    • Events
    • Blackboard
    • Logic
      • Interface
      • Create Graph
      • Execute graph
      • Control flow execution in groups
      • Custom Nodes
        • Asynchronous execution
        • Node Attributes
      • Scene Components
      • Graph Events
      • Finite State Machine
        • Create custom Actions
        • Examples
        • State Machine Nodes
    • Stats
      • Achievements
      • Modifiers
      • Values
      • Progressions
      • Components
      • Nodes
    • Progress
      • Progress Settings
      • Progress Graph
      • Progress Resources
      • Runtime UI Setup
      • API
        • ProgressController
    • Techtree (LEGACY)
      • Techtree Manager
      • Techtree
      • TechtreeResource
      • Techtree UIBuilder
        • Custom Techtree Node Button
        • Tooltip
      • API
    • Localization
      • Localization Manager
      • Localization
      • Examples
      • Components
      • Import
      • API
    • Inventory
      • Getting started
      • Demo
      • Data setup
        • Inventories
        • Slot IDs
        • Items
          • Blueprints
          • Item rarities
        • Money
        • Loot tables
        • Events
      • Runtime UI
        • Setup
    • Dialogue
      • Getting Started
        • Demo
      • Dialogue runtime setup
      • Actors
        • Emotions
      • Localization
      • Audio
      • Animation
      • Variables
      • Custom theme
      • Import
      • Nodes
      • API
        • DialogueController
        • IDialogueUIControl
  • Changelog
    • Databrain - Changelog
      • 1.4.0
      • 1.3.2
      • 1.3.1
      • 1.3.0
      • 1.2.0
      • 1.1.0
      • 1.0.10
      • 1.0.9
      • 1.0.8
      • 1.0.7
      • <= 1.0.6
Powered by GitBook
On this page
  • Save
  • Load
  • GetRuntimeDataObjectByGuid
  • GetInitialDataObjectByGuid
  • GetRuntimeDataObjectByTitle
  • GetInitialDataObjectByTitle
  • GetInitialFirstDataObjectByType
  • GetAllRuntimeDataObjectsByType
  • GetAllInitialDataObjectsByType
  • RuntimeDataObjectWithGuidExists
  • InitialDataObjectWithGuidExists
  • CloneDataObjectToRuntime
  • RemoveDataObjectFromRuntime
  1. API

DataLibrary

Save

Save the runtime-DataLibrary to a json file

  • _path: The path including file name with extension

Load

Load json file to runtime-DataLibrary

  • _path: The path including file name with extension

GetRuntimeDataObjectByGuid

Returns a runtime-DataObject by its guid

  • _guid: The guid as string

  • _type: optional type

GetInitialDataObjectByGuid

Returns an initial-DataObject by its guid

  • _guid: The guid as string

  • _type: optional type

GetRuntimeDataObjectByTitle

Returns a runtime-DataObject by its name

  • _title: name of the DataObject

  • _type: optional type

GetInitialDataObjectByTitle

Returns an initial-DataObject by its name

  • _title: name of the DataObject

  • _type: optional type

GetInitialFirstDataObjectByType

Get the first dataobject in the list by type. This is useful for manager types where we only have one object

  • _type: DataObject type

GetAllRuntimeDataObjectsByType

Returns a list of all runtime data objects of type

  • _type: DataObject type

  • _includeSubtypes: optional, include subtypes to the list

GetAllInitialDataObjectsByType

Returns a list of all initial data objects of type

  • _type: DataObject type

  • _includeSubtypes: optional, include subtypes to the list

RuntimeDataObjectWithGuidExists

Returns true or false whether DataObject exists or not

  • _guid: the guid of the DataObject

  • _type: optional type

InitialDataObjectWithGuidExists

Returns true or false whether a DataObject exists or not

  • _guid: the guid of the DataObject

  • _type: optional type

CloneDataObjectToRuntime

This will make a new instance of the data object and add it to the runtime DataLibrary object. If the DataObject has a runtime data class, it can then be serialized.

  • _data: The initial DataObject to clone

  • _ownerGameObject: When providing an owner game object, the runtime clone will use the object instance id instead of a guid. This also helps finding the appropriate runtime clone if an initial data object has multiple clones.

RemoveDataObjectFromRuntime

Remove a DataObject from the runtime DataLibrary

  • _data: The DataObject to be removed

  • _type: optional type

PreviousField attributesNextDataObject

Last updated 1 year ago