<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — Problem with LinkedObserver]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=2369</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2369&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Problem with LinkedObserver.]]></description>
		<lastBuildDate>Tue, 03 Jun 2025 08:30:28 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Problem with LinkedObserver]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9829#p9829</link>
			<description><![CDATA[<p>Thanks, I&#039;ll message you on Discord</p>]]></description>
			<author><![CDATA[null@example.com (ffeniks)]]></author>
			<pubDate>Tue, 03 Jun 2025 08:30:28 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9829#p9829</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem with LinkedObserver]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9828#p9828</link>
			<description><![CDATA[<p>Hi.</p><p>Unity should not call the constructor. <br />The constructor is for you (users) so you can dynamically create LinkedObserver&#039;s.</p><p>_isObserverInitialized should not be serialized or cached because it is private and marked using NonSerialized attribute.</p><p>From your description I think the problem is in cross scene references.<br />In short: project elements can only reference other project elements. Scene elements can refer to elements of the current scene or project.<br />But a project element cannot refer to a scene, and an element in scene A cannot refer to an element in scene B.<br />Unity does not support this.</p><p>If the problem remains please send me your project, I will check it.<br />P.S. I don&#039;t need your working project. Any temporary project that shows the problem is enough for testing.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 02 Jun 2025 15:16:39 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9828#p9828</guid>
		</item>
		<item>
			<title><![CDATA[Problem with LinkedObserver]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9827#p9827</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (ffeniks)]]></author>
			<pubDate>Mon, 02 Jun 2025 10:27:12 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9827#p9827</guid>
		</item>
	</channel>
</rss>
