CharacterAttributeTemplateDatabase - jimdroberts/FishMMO GitHub Wiki
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.
-
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.
- Create a CharacterAttributeTemplateDatabase ScriptableObject via the Unity editor (Assets > Create > FishMMO > Character > Attribute > Database).
- Add CharacterAttributeTemplate objects to the Attributes list in the Inspector.
- Reference the database in your character or attribute management systems as needed.
// 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);
- 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.