Description
The OnComponentFixedUpdate
property is an event handler that is invoked during the fixed update phase of the component's lifecycle. This phase is typically used for physics-related updates, as it is called at a consistent rate independent of the frame rate. Assign a method to this property to execute custom logic during the fixed update cycle.
Usage
To use the OnComponentFixedUpdate
property, assign a method to it that you want to be called during the fixed update phase. This is useful for handling physics calculations or other time-sensitive operations that need to be updated at a consistent rate.
Example
public class MyComponent : Component
{
public MyComponent()
{
OnComponentFixedUpdate = HandleFixedUpdate;
}
private void HandleFixedUpdate()
{
// Your fixed update logic here
// For example, applying physics forces
}
}