Skip to main content

AttributeObject

class SoftKitty.AttributeObject : DataObject

AttributeObject is a DataObject that manages attribute settings within the system.

You can create this object via the context menu in any Project folder:

Create → SoftKitty → Data Objects → Attribute Data

You can assign the created asset to the database in: Project Settings → SoftKitty → Data Settings → Data

After assigned the data object, a editor interface can be found at:

Project Settings → SoftKitty → SubData - Attributes

Where you can easily manage attributes with convenient editor interface.


Properties

public static AttributeObject instance

Retrieve the instance of the AttributeObject instance assigned in SoftKitty Data Settings.


List<Attribute> AttributeList

A list of all attribute definitions. Each entry defines base values, upgrade behavior, and attribute type.


string[] AttributesNames

An array of attribute display names (e.g. "Health", "Attack"). Useful for UI, debugging, or quick reference.


string[] AttributesUidArray

An array of attribute UIDs. Provides direct access to attributes using unique identifiers.


Methods

Attribute GetAttribute(string _uid)

Retrieves an attribute definition by its unique string UID.

Attribute attribute = data.GetAttribute("atk");

More readable and convenient for scripting.


Attribute GetAttribute(int _id)

Retrieves an attribute definition by its integer ID.

Attribute attribute = data.GetAttribute(3);

Use this for performance-critical lookups.