Topic: Problem with LinkedObserver
Hey, I have a problem with LinkedObserver:
I have Source Prefab class with some ValueObserver called "value" and Watcher Prefab class with LinkedObserver called "_state"
Then, in Unity Editor I set _state linked observer to watch SourcePrefab.value
In WatcherPrefab I do:
private void Start() {
_state.AddListener(onStateChange);
}
It doesn't work as Unity somehow does not call LinkedObserver's constructor, caches _isObserverInitialized as "true" (I checked with debugger) and _state.Observer remains null, despite it being set in the editor.
I use Unity 6