Built for designers in mind, with a built in property drawers and realtime property additions. Simplify your process and allow for more information to be used within a tooltip.
Allows for both indices and named variable access with the click of a toggle
Clear Values button has been added if during programming a designer doesn't know if the list is up to date click the button. This will clear the values and look as though the list is empty, depending on where the initialization is located, modify a value within the object such as clicking UseIndices twice and this will refresh the values.
Example: "Deals {0} to {1} {2} damage to the target."
Example: "Deals {minDamage} to {maxDamage} {damageType} damage to the target."
Example: "Deals 3 to 8 Fire damage to the target."
Programmers have been provided 4 different ways to add keys to the formatter: To build the list automatically call ValidationInitialization() in any of: OnValidate(), OnDrawGizmos(), or OnDrawGizmosSelected().
Note: ScriptableObjects will need to use OnValidate()
The [StringKey] attribute allows for any variable within the current class or inherited class to be added during validation.
[StringKey]
public int minDamage = 2,
maxDamage = 5;
[StringKey]
public string damageType = "Fire";
public FormattedString toolTip;
private void OnValidate()
{
toolTip.ValidationInitialization(this);
}Allows for an enumeration to be sent to the FormattedString and which will then use the EnumNames to try add new keys. (Not Case Sensative)
public int minDamage = 2,
maxDamage = 5;
public string damageType = "Fire";
public enum FieldKeys
{
MinDamage,
MaxDamage,
DamageType
}
public FormattedString toolTip;
private void OnDrawGizmos()
{
toolTip.ValidationInitialization<FieldKeys>(this);
}Allows for an string [] to be sent to the FormattedString and which will then use the strings to try add new keys. (Not Case Sensative)
public int minDamage = 2,
maxDamage = 5;
public string damageType = "Fire";
public FormattedString toolTip;
private void OnValidate()
{
toolTip.ValidationInitialization(this, new string [] {"minDamage", "mAxDamage", "damageType"});
}Allows for each key to be added manually, this provides the best performance as each object is not using reflection. This also allows for other objects to be added and also allows for custom names to be added. This can provide consistancy if different programmers are on different parts of a project.
public Character character;
public int minDamage = 2,
maxDamage = 5;
public string damageType = "Fire";
public FormattedString toolTip;
private void OnDrawGizmosSelected()
{
toolTip.RegisterValue("MinimumDamage", minDamage);
toolTip.RegisterValue("maxDamage", maxDamage);
toolTip.RegisterValue("DType", damageType);
toolTip.RegisterValue("%T", character.DisplayName);
}
