đŖProperties
Assigning and managing property mappings
Last updated
Assigning and managing property mappings
Last updated
Properties are used by channels to map to a specific field of a component or material. This is the means by which Timeflow applies animations to objects.
When adding a property-based channel, the context menu displays a list of component properties on the object, as shown below. Submenus are organized by component, each listing the properties Timeflow can animate, followed by the target attribute (if it is a complex value, such as a vector or color).
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 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 that of a float value.
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 ore may not respect unsigned types, however Limit Value may be used on channels to strictly keep values within a specified range.
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.
A data only assignment may also be used to temporarily bypass normal output while still keeping the channel alive and continuing to produce an output value 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.
If you see something similar to the warning below, or an "(Unassigned)" property, it simply means that the property mapping is invalid or not found. This can be solved by clicking on the button to select a property from the menu displayed.
This warning can also occur when their 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.