CharacterAttributeTemplateDatabase - jimdroberts/FishMMO GitHub Wiki

Description

ScriptableObject database that holds a list of all character attribute templates for the game. Used to manage and reference available attributes in the editor and at runtime in the FishMMO system.


API Access

Fields

  • public List Attributes

    List of all character attribute templates included in this database. Populate this list in the Unity editor to make attributes available for characters.


Basic Usage

Setup

  1. Create a CharacterAttributeTemplateDatabase ScriptableObject via the Unity editor (Assets > Create > FishMMO > Character > Attribute > Database).
  2. Add CharacterAttributeTemplate objects to the Attributes list in the Inspector.
  3. Reference the database in your character or attribute management systems as needed.

Example

// Example 1: Accessing all attribute templates
foreach (var attribute in attributeDatabase.Attributes) {
    // Use attribute template
}

// Example 2: Adding a new attribute template
attributeDatabase.Attributes.Add(newAttributeTemplate);

Best Practices

  • Keep the Attributes list organized and up to date for all available character attributes.
  • Use the database as a central reference for attribute management and lookups.
  • Use ScriptableObjects for easy data management and editor integration.
⚠️ **GitHub.com Fallback** ⚠️