Value Observer

Editor-Friendly Observer Pattern

Value Observer is an editor-friendly implementation of the Observer pattern.

 

Contains:

ValueObserver<T> - observes the value change and notifies listeners. Allows to validate the value change.  

LinkedObserver<T> - connects observer located in another component and allows to use it as a field of this class.

LinkedValue<T> - connects any Serialized Property of any other component or Scriptable Object and allows it to be used as a field of this class.

LinkedMethod<TResult> - connects any method that returns a value. Editor-friendly equivalent of Func<TResult>. Supports up to 10 parameters.

 

Advantages:

  • Very easy to use.
  • Weak code dependency.
  • Completely editor friendly.
  • Works in play mode and in edit mode.
  • Very short syntax.
  • Improves the performance of your application (in cases where you check for value changes in Update or don't check for changes at all).Value Observer is an editor-friendly implementation of the Observer pattern.

Gallery

See also

Real World Terrain
Real World Terrain is a tool for automatically creating high-quality terrains, meshes, Gaia stamps and RAW files based on real-world data with global coverage.
Incredibly fast and easy to use, and allows you to create high-quality terrains in a couple of clicks.
In addition, Real World Terrain can create buildings, roads, trees, grass, and rivers based on Open Street Map data.
Real World Terrain is incredibly powerful and flexible. It has a powerful Editor API to automate the generation of terrains, and Runtime API positioning objects by coordinates, etc.
Real World Terrain has integration with the best assets of the Asset Store, which gives almost unlimited possibilities in the generation of terrains.