
A lightweight, attribute-based tick system for scheduling code execution at fixed intervals.Unity 2021.3+ CompatibleEasily run methods at set intervals in your Unity projects with this hassle-free tick scheduler. Use [Tick] attributes for automatic callbacks, or schedule tasks dynamically via a simple API. Ideal for timers, periodic updates, and background jobs, no complex setup required. Suitable for any genre or project where you need repeatable or one-off timed events. The system supports both scaled time (paused with the game) and unscaled time (real-time), giving you full control over scheduling in any scenario. Drop it in, run on time: no boilerplate required.This system is useful for:Cooldowns and ability timersHealth regeneration ticksAI pathfinding or scan intervalsSave autosync or cloud checksMultiplayer ping/polling intervalsTime-based UI updates (e.g., clock, event countdown)Lightweight alternative to coroutines or InvokeRepeatingAny situation where you want repeatable or one-off timed executionAttribute-Based Callbacks: Use [Tick(interval, mode)] on parameterless methods for effortless scheduling.Dynamic Scheduling: Call OnTick.Schedule or OnTick.ScheduleOnce to add tasks at runtime.No GC Allocation Schedule: Call OnTick.ScheduleNoAlloc to add tasks with no GC allocation overhead.Scaled & Unscaled Time: Switch between normal game time (Time.deltaTime) or real-time (Time.unscaledDeltaTime) with TickMode.Pause & Resume: Temporarily pause or resume individual ticks for flexible control.One Manager, All Ticks: A single OnTick component in your scene handles everything, no extra overhead.No Reflection: Compiles [Tick] methods into delegates for fast, direct invocation.Easy Integration: Just drop OnTick onto a GameObject, and you’re ready to go.Clean API: Simple, readable codebase with no heavy dependencies, quick to learn and use.TickValidator: SimpleTick validates your [Tick] methods on scene load to ensure they're parameterless and correctly configured, warning you of any invalid usage automatically.Scoped Tick Support: Tick handles implement IDisposable, allowing for optional using blocks to automatically unschedule ticks when out of scope: perfect for tools, tests, or temporary behavior.Custom Error Handling: Define per-tick error callbacks to isolate failures and prevent a single exception from halting the scheduler.Supports Up to 3 Arguments: You can pass up to three arguments directly to dynamically scheduled functions using overloads. No need to wrap everything in a closure unless you want to.Completely MonoBehaviour-Decoupled Backend: Internally decoupled from Unity’s update loop. Ticks are processed via a single scene bridge, but the engine logic is mostly portable for future custom use outside Unity if needed.