🍣Properties
Assigning and managing property mappings
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.

Adding Channels with Properties
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.
Alphabetical Sorting
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.

Assigning Properties
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.
Attribute (X,Y,Z)
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.

Combined
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.

Uniform Value
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.
Data Types
Timeflow properties support all standard numerical types as well as objects and strings.
Float
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.
Integer
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
Boolean values can only be on or off (true or false).

Vector
Vector values can range from 2 to 4 attributes (X, Y, Z, W)

Color
Color values have 4 attributes (R, G, B, A).

Rect
Rect values are similar to vectors but with slightly different attributes (X, Y, W, H)

String
String values control text properties.

Component
Use this type to animate component reference fields.

GameObject
Animates references to game objects.

Textures
Animates texture references.

Data-Only Properties
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.

Cross-Object References
Properties by default relate to the current game object, however may target properties on other game objects in the scene.
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.

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.
Scripting Custom Properties
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.
using AxonGenesis;
using UnityEngine;
[ExecuteInEditMode]
public class CustomPropertyExample : MonoBehaviour
{
[Tooltip("Animate this Value to control your custom type")]
public float Value;
private class MyCustomType
{
public void SetValue(float value)
{
Debug.Log("Value: " + value);
}
}
private MyCustomType myCustomType;
void Start()
{
myCustomType = new MyCustomType();
}
void Update()
{
// Pass the value to your custom type or method
myCustomType.SetValue(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.

Property Errors and Unassigned Properties
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.
Last updated