Properties
Assigning and managing property mappings
Last updated
Assigning and managing property mappings
Last updated
Properties map to a specific value or field with a component or material. This provides the means to apply animations and behaviors to game objects.
When adding a property-based channel or behavior, the context menu displays a list of component properties on the object, shown below.
Submenus are organized by component, each listing the properties that can be animated, followed by the target attribute (if it is a complex value, such as a vector or color).
Avoid multiple animation channels targeting the same property, otherwise conflicts may produce unexpected and unpredictable results.
Properties are listed in alphabetical order, with longer lists divided into submenus starting with the first letter of the property name. These names are defined by the script or object they belong to.
Property lists are created automatically using System.Reflection to discover all writable fields filtered by type to expose only values which Timeflow can animate. All others are hidden including internal editor variables which shouldn't be animated.
For further on this topic, see Property Handlers.
Discovering Properties To explore properties it is recommended to look at the code in question, or to use Debug Mode in the Inspector to display all component properties. Holding the Alt key while in the Inspector reveals the internal names of fields.
When a channel is selected, its property assignment is displayed in the Info Panel or in the Inspector view. Clicking the main button (displaying the current assigned property name) displays a drop-down menu to select another property.
Properties may be changed at any time and reassigned from one value type to another. When the value has multiple attributes (such as a vector or color), an extra drop-down menu is displayed on the right to select the attribute, or choose Combined or Uniform Value, described in more detail below.
Any property type with more than one value is displayed with the option to select a single attribute or all. An attribute in this case refers to a specific axis (X, Y, Z, W) or color channel (R, G, B, A) or other attribute particular to the data type.
Instead of a single attribute, you can use Combined mode to animate the whole complex value. For example, when animating an object's position, this allows each keyframe to store a 3d coordinate (Vector3). Each attribute is displayed with a separate curve in the Graph View, however the attributes share the same keyframe time and interpolation.
Separate vs Combined Adding each attribute (X,Y,Z) as a separate channel provides more control since each channel has its own independent keyframes. However, a single combined channel is more convenient for some value types, such as when animating colors.
This mode assigns the same value to each attribute (ex: XYZ = 1,1,1). This mode is most commonly used for scale values to maintain uniform scale.
Timeflow properties support all standard numerical types as well as objects and strings.
A single floating point value.
Double and Decimal types are supported but converted to Float for processing, since these large numeric types are almost never used in Unity and would bloat serialization and memory if included. Mapping properties to double fields should work as expected, though precision is limited to float values.
All integral data types are supported, including enumerations. Interpolation is supported with integer types, however produces stepped results.
All integral types are converted to Int32. Output values may or may not respect unsigned types, however Limit Value may be used on channels to strictly keep values within a specified range.
Boolean values can only be on or off (true or false).
Vector values can range from 2 to 4 attributes (X, Y, Z, W)
Color values have 4 attributes (R, G, B, A).
Rect values are similar to vectors but with slightly different attributes (X, Y, W, H)
String values control text properties.
Strings and object types do not interpolate but change immediately when the keyframe is reached. Although the keyframes can be moved vertically in the graph view, it has no effect on the animation.
Use this type to animate component reference fields.
Animates references to game objects.
Animates texture references.
Instead of mapping to a field value, a property may instead be used to hold data of any type. A data-only property has no direct output other than to store and/or generate a value which can be used for calculations using Channel Link or other scripting method.
A data-only assignment may also be used to temporarily bypass normal output while still keeping the channel alive and continuing to produce output values for other channels to reference.
Properties by default relate to the current game object, however may target properties on other game objects in the scene.
Use caution when using cross-object mappings! This feature is allowed, however not recommended as a general practice since it can lead to confusing setups that are difficult to troubleshoot. If you do create such mappings, it is advised to use labels or a Comment on the target object to indicate which objects control it.
Timeflow automatically discovers all serialized fields in MonoBehaviour-based components. However, when you need to animate a value that is not directly accessible, such as a static field, a Scriptable Object, or a custom data type, then you'll need to write a simple script to expose the value.
Above is an example script showing how to animate a value which isn't directly accessible in the properties menu. This script can be added to a game object and then animated to control the underlying value.
If you encounter a warning icon or an "(Unassigned)" property, it simply means that the property mapping is invalid or not found. This can be solved by clicking on the red button to select a property from the menu displayed.
This warning can also occur when there are property-breaking script changes, such as the field name being renamed or removed from serialization. If a code change you make causes this to occur, you may consider reverting those changes, or otherwise reassign any broken property mappings.
Click the link icon to show the game object reference field. This is only displayed if there is adequate horizontal space, so expanding the panel or view may be needed.