<?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 — Exception thrown in OnlineMapsDrawingElement because null "gameobject"]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=479</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=479&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Exception thrown in OnlineMapsDrawingElement because null "gameobject".]]></description>
		<lastBuildDate>Tue, 28 Mar 2017 14:20:44 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Exception thrown in OnlineMapsDrawingElement because null "gameobject"]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2106#p2106</link>
			<description><![CDATA[<p>Hello.</p><p>Thank you for bug report.<br />The bug is fixed.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Tue, 28 Mar 2017 14:20:44 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2106#p2106</guid>
		</item>
		<item>
			<title><![CDATA[Exception thrown in OnlineMapsDrawingElement because null "gameobject"]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2099#p2099</link>
			<description><![CDATA[<p>There is an issue with the OnlineMapsDrawingElement class that causes an exception in the &quot;active&quot; property.</p><p>The &quot;gameobject&quot; that SetActive is being called on could be null, and there is no null check. This null check was in place in the previous version of the tool that we were using, but is no longer there when we upgraded to build 2.5.4.1.</p><p>This occurs if an OnlineMapsDrawingRect is created, and then has its &quot;visible&quot; property set to false.<br />If this happens the method InitMesh() is never called for the drawing element, and the gameobject is never set, and it remains null, and causes issues later.</p><p>We fixed this issue by adding the null check back in the &quot;active&quot; property.</p><p>So:</p><p>&nbsp; &nbsp; protected virtual bool active<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; get<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return gameObject.activeSelf;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; set<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (gameObject)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gameObject.SetActive(value);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }</p>]]></description>
			<author><![CDATA[null@example.com (bp10719)]]></author>
			<pubDate>Mon, 27 Mar 2017 21:55:29 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2099#p2099</guid>
		</item>
	</channel>
</rss>
