<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Value Observer]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;fid=65&amp;type=atom" />
	<updated>2025-06-02T10:27:12Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/index.php</id>
		<entry>
			<title type="html"><![CDATA[Problem with LinkedObserver]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?id=2369&amp;action=new" />
			<summary type="html"><![CDATA[<p>Hey, I have a problem with LinkedObserver:</p><p>I have Source Prefab class with some ValueObserver called &quot;value&quot; and Watcher Prefab class with LinkedObserver called &quot;_state&quot;</p><p>Then, in Unity Editor I set _state linked observer to watch SourcePrefab.value</p><p>In WatcherPrefab I do:</p><p>&nbsp; &nbsp; private void Start() {<br />&nbsp; &nbsp; &nbsp; _state.AddListener(onStateChange);<br />&nbsp; &nbsp; }</p><p>It doesn&#039;t work as Unity somehow does not call LinkedObserver&#039;s constructor, caches _isObserverInitialized as &quot;true&quot; (I checked with debugger) and _state.Observer remains null, despite it being set in the editor.</p><p>I use Unity 6</p>]]></summary>
			<author>
				<name><![CDATA[ffeniks]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=21245</uri>
			</author>
			<updated>2025-06-02T10:27:12Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?id=2369&amp;action=new</id>
		</entry>
</feed>
