using System; using UnityEngine; namespace RPGCoreCommon.DynamicValues { [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Method)] public class DynamicValueProviderAttribute : PropertyAttribute { /// /// [Fields/Property]
/// Marks non-public field or property to provide value for 's formula. /// Public fields and properties are always used as value providers. /// Collections are ALWAYS ignored - if you want to get values from collection try to use custom method. More info below. ///

/// [Method]
/// Method can be marked as custom value provider. /// Those methods can have any name, but require specific return value and one parameter. /// Only two definitions of methods are valid, ex.: /// ///
public DynamicValueProviderAttribute() { // TODO: tutaj jeszcze jako argument trzeba przekazać nazwę drugiej metody, która ma listę możliwych stringów w przypadku użycia na CustomProviderMethod(string), wtedy będzie można to fajnie walidować już na poziomie tego narzędzia } } }