Skip to content

Releases: ocean-view-games/unity-mobile-performance-architecture

Release list

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 21 Aug 17:10

Initial release.

Added

  • FrameTimingProfiler — a zero-allocation rolling window over frame timing.
    Measures real CPU frame cost through Unity's FrameTimingManager, falling back to
    the wall-clock frame interval where Frame Timing Stats are unavailable. Under a
    frame cap the interval is pinned to the cap and carries no information about spare
    headroom, so measuring cost directly is what lets quality decisions be made against
    observable headroom rather than a guess. Exposes ActiveSource,
    IsMeasuringFrameCost, CurrentFrameTimeMs, CurrentFps, RequestedTargetFps,
    TargetBudgetMs, GetBudgetMsForTargetFps(int), an allocation-free SpikeDetected
    event, and two read paths: GetWindowHealth() for the statistics that need no
    ordering, in a single O(n) pass, and GetSummary() where percentiles are required.
    Frame-rate targets resolve against the display's refresh rate, so a 60 FPS target on
    a 90 Hz panel is budgeted as the 45 FPS it actually runs at.
  • MemoryBudgetTracker — per-platform memory budgets with warning, critical and
    over-budget thresholds. Each threshold latches and re-arms against its own line with
    a configurable hysteresis margin (thresholdRearmMargin, ActiveLatch,
    MemoryThresholdLatch), so a device oscillating around the budget keeps raising
    events rather than firing once per session. Unavailable or unconfigured measurements
    are reported as unavailable through IsMeasurementAvailable instead of reading as
    free headroom.
  • AdaptiveQualityManager — tiered quality scaling driven by the profiler and the
    memory tracker. Thresholds are relative to the active tier's own frame budget rather
    than fixed milliseconds, which prevents a healthy capped tier reading as failing.
    Upgrades require measured headroom (upgradeHeadroomRatio) when CPU frame cost is
    available, and remain speculative only on the frame-interval fallback where headroom
    cannot be observed. Repeatedly failed upgrades back off exponentially
    (ConsecutiveFailedUpgrades, CurrentUpgradeDelaySeconds) rather than sawtoothing
    between two tiers. VSync is managed by default (manageVSync) because
    Application.targetFrameRate is a no-op while vSyncCount is non-zero. Global
    QualitySettings are captured on enable and restored on disable, including the
    frame-rate target pushed into the profiler.
  • BatteryAwareScheduler — background work scheduling that responds to battery
    level and charging state.
  • Editor performance dashboard — live frame percentiles, on-target percentage,
    spike count, sample count, measurement source, the full allocation breakdown, tier
    backoff state, a manual Rescan Scene button, and a JSON snapshot export covering
    all of it. Scene scanning runs on the repaint tick, and export runs outside the
    OnGUI call stack with failures reported through a dialog.
  • Decision logic across all four components is exposed as pure internal static
    predicates, which is what makes the 95-test Editor suite possible.
  • Package manifest, assembly definitions, .gitignore, .editorconfig and this
    changelog, so the package installs through the Package Manager and its tests are
    runnable by anyone who clones it.

Notes

  • There is no thermal monitoring component. Unity exposes no cross-platform thermal
    API and the Adaptive Performance package has no iOS provider, so such a component
    would report "Nominal" on half its target platforms.