BasicStats.AddAttribute
Declaration#
public GDTKAttribute AddAttribute(string id, IUniquelyIdentifiable source)Parameters#
| Name | Description |
|---|---|
| id | Id of the attribute to add |
| source | Object adding this Attribute |
Description#
Add an Attribute to the object.
Usage#
Example
using NullSave.GDTK;using NullSave.GDTK.Stats;using UnityEngine;
public class Example : MonoBehaviour, IUniquelyIdentifiable{
// Implment the IUniquelyIdentifiable interface to call RemoveXBySource public string instanceId { get { return "exampleInstance"; } }
public void ExampleMethod(BasicStats source) { source.AddAttribute(source.database.attributes[0].info.id, this); }
}