Class CharacterAttributeTemplate
[CreateAssetMenu(fileName = "New Character Attribute", menuName = "FishMMO/Character/Attribute/Character Attribute", order = 1)]
public class CharacterAttributeTemplate : CachedScriptableObject<CharacterAttributeTemplate>, ICachedObject
- Inheritance
-
ObjectScriptableObjectCharacterAttributeTemplate
- Implements
- Derived
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Fields
ChildTypes
Set of child attribute types (attributes this one depends on for formulas).
public CharacterAttributeTemplate.CharacterAttributeSet ChildTypes
Field Value
ClampFinalValue
If true, the final value of this attribute is clamped between MinValue and MaxValue.
public bool ClampFinalValue
Field Value
DependantTypes
Set of dependant attribute types (additional dependencies for complex relationships).
public CharacterAttributeTemplate.CharacterAttributeSet DependantTypes
Field Value
Description
A description of the attribute, used for tooltips and UI.
public string Description
Field Value
Formulas
Dictionary of formulas defining how each child attribute affects this attribute.
public CharacterAttributeTemplate.CharacterAttributeFormulaDictionary Formulas
Field Value
InitialValue
The initial (base) value for this attribute when a character is created.
public int InitialValue
Field Value
IsPercentage
If true, this attribute is treated as a percentage (e.g., 0-100%).
public bool IsPercentage
Field Value
IsResourceAttribute
If true, this attribute is a resource (e.g., health, mana) that can be consumed or regenerated.
public bool IsResourceAttribute
Field Value
MaxValue
The maximum value this attribute can have (used for clamping).
public int MaxValue
Field Value
MinValue
The minimum value this attribute can have (used for clamping).
public int MinValue
Field Value
ParentTypes
Set of parent attribute types (attributes that depend on this one).
public CharacterAttributeTemplate.CharacterAttributeSet ParentTypes
Field Value
Properties
InitialValueAsPct
Returns the initial value as a percentage (InitialValue * 0.01f).
public float InitialValueAsPct { get; }
Property Value
Name
The display name of the attribute (from the ScriptableObject's name).
public string Name { get; }
Property Value
Methods
Tooltip()
Builds a rich text tooltip string describing this attribute, including name, description, and value ranges. Uses TooltipColors for consistent formatting.
public string Tooltip()
Returns
- string
Formatted tooltip string for UI display.