docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RateUtils.FixedRateCatchUpManager

    Implements system update semantics similar to UnityEngine.MonoBehaviour.FixedUpdate.

    Inheritance
    object
    RateUtils.FixedRateCatchUpManager
    Implements
    IRateManager
    Namespace: Unity.Entities
    Assembly: solution.dll
    Syntax
    public class RateUtils.FixedRateCatchUpManager : IRateManager
    Remarks

    When this mode is enabled on a group, the group updates exactly once for each elapsed interval of the fixed timestep.

     For example, assume a fixed timestep of 0.02 seconds. If the previous frame updated
     at an elapsed time of 1.0 seconds, and the elapsed time for the current frame is now 1.05 seconds, then the
     system group updates twice in a row: one with an elapsed simulation time of 1.02 seconds, and a second time
     with an elapsed time of 1.04 seconds. In both cases, the delta time is reported as 0.02 seconds. If the
     elapsed wall time for the next frame is 1.06 seconds, then the system group doesn't update at all for that
     frame.
    
     This mode provides the strongest stability and determinism guarantees, and is best suited for systems implementing
     physics or netcode logic. However, the systems in the group will update at an unreliable rate each frame, and
     may not update at all if the actual elapsed time is small enough. The running time of systems in this group
     must therefore be kept to a minimum. If the wall time needed to simulate a single group update exceeds the
     fixed timestep interval, the group can end up even further behind than when it started, causing a negative
     feedback loop.
    

    Constructors

    Name Description
    FixedRateCatchUpManager(float)

    Construct a new instance

    Properties

    Name Description
    Timestep

    The timestep since the previous group update (in seconds).

    Methods

    Name Description
    ShouldGroupUpdate(ComponentSystemGroup)

    Determines whether a system group should proceed with its update.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)