Concurrent Value

The Concurrent Value asset is an all-around solution for dealing with a common issue when creating a game, having a value concurrently modified by multiple objects at once.

This asset is a bit outdated but still works well, you can get it for free on the asset store.
If you want to support me, you can check out my other higher quality assets :).

Despite a pretty simple goal, this asset provides a lot because of technical challenges that comes with doing arithmetic in a generic class, and making it serialize on Unity versions prior to 2020.1.

It is very useful and time saving when making gameplay elements that interact heavily with each others (multiple effect zones affecting the same character at once, complex RPG statistics system, etc).

Thanks to a complete documentation, tutorial videos and an automatic script generation window, this asset is usable by anyone with basic knowledge of programming.
An advanced user will find it very useful too: indeed, a lot of tricky problems have been tackled in order to get this asset to work. It will save you some precious production time, and a good object-oriented conception will allow you to extend it if need be.
This asset works for Unity version 2018.3 or higher and will be kept up to date with later releases.

• Built with performance as a main goal.
• Easy to use and very complete.
• Full sources are included.

• The Concurrent class complete with every possible operators (unary, binary or custom delegates), an event on value change, support for serialization (including custom delegates and event), optimized processing of the final value, a quick syntax and more.
• Multiples Calculator classes providing a solution to the problem of doing arithmetic operation in a template class. Two generics one perfect for fast prototyping and a specific one ready to be inherited for the best possible performances.
• Three Windows, a help/tutorial window, a benchmark window with 3 tests, and a window dedicated to auto-extending the asset (meta programming) allowing you to create new Concurrent or new Calculator as easily as typing a value type and clicking on a button.
• A handy inspector drawer ready for efficient level design, debug and more.
• A simple example scene.

How to use

If you want more in-depth information, check out the Documentation.