Overriding Action Values at Runtime
v1.0
Prerequisites
Override Methods
public bool SetFieldOverride<TAction>(string fieldName, object value, bool turnOverrideOn = true) where TAction : Action;
public bool SetFieldOverride(System.Type actionType, string fieldName, object value, bool turnOverrideOn = true);
public bool SetFieldOverrideByActionName(string actionName, string fieldName, object value, bool turnOverrideOn = true);
public int SetFieldOverrideForAllActions<TAction>(string fieldName, object value, bool turnOverrideOn = true) where TAction : Action;
public int SetFieldOverrideForAllActions(System.Type actionType, string fieldName, object value, bool turnOverrideOn = true);
public bool SetFieldOverrideEnabled<TAction>(string fieldName, bool enabled) where TAction : Action;
public bool SetFieldOverrideEnabled(System.Type actionType, string fieldName, bool enabled);
public bool SetFieldOverrideEnabledByActionName(string actionName, string fieldName, bool enabled);
public bool TryGetFieldOverride<TAction, TValue>(string fieldName, out TValue value) where TAction : Action;
public bool IsFieldOverrideEnabled<TAction>(string fieldName) where TAction : Action;
public bool IsFieldOverrideEnabled(System.Type actionType, string fieldName);
public bool ClearFieldOverrides<TAction>() where TAction : Action;
public bool ClearFieldOverrides(System.Type actionType);
public List<string> GetOverridableFieldNames<TAction>() where TAction : Action;
public List<string> GetOverridableFieldNames(System.Type actionType);Example – change a float at runtime
Example – drive from a UI Slider
How overrides are applied
Choosing a lookup strategy
Enabling / disabling an override flag
Inspecting overrides
Clearing overrides
Timing & restarts (important)
Flow diagram (how a new override takes effect)

Last updated