The Unity Engine is a powerful tool for creating amazing results. However, when working with independent subsystems that run outside the Unity thread, synchronization issues can arise. These subsystems, such as thread-based, network-based, and CAN/LIN/Serial Bus systems, operate at their own speed and must be synchronized with the Unity thread to ensure smooth interactions.
This package provides components to help synchronize with the Unity thread, including:
- Sync: Queue actions to be invoked on the next call of the desired Unity update (Update(), FixedUpdate(), LateUpdate())
- EventSync: Hook onto the desired Unity update with listeners
By using this package, you can:
- Avoid reimplementing existing code based on Unity logic
- Boost performance by reducing the number of MonoBehaviours
- Add flexibility with a single wrapper that syncs your code into Unity
- Dispose of components automatically when destroyed
- Ensure thread safety and built-in DontDestroyOnLoad functionality
This package is the result of years of experience with Unity and its use outside of games.
Sync:
- Enqueue actions to be invoked once on the next call of the desired Unity update
- Supported updates: Update(), FixedUpdate(), LateUpdate()
EventSync:
- Hook onto the desired Unity update with listeners
- Please use this component only if necessary, as it can lead to spaghetti code and clutter
Benefits:
- No need to reimplement existing code based on Unity logic
- Boost in performance
- Adds flexibility
- Each component disposes itself OnDestroy()
- All relevant methods are thread safe
- Build-In DontDestroyOnLoad functionality
- Clear Naming





