<?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 — Toggle Buildings/Traffic On/Off]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=2035</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2035&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Toggle Buildings/Traffic On/Off.]]></description>
		<lastBuildDate>Sat, 24 Sep 2022 11:27:57 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Toggle Buildings/Traffic On/Off]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8622#p8622</link>
			<description><![CDATA[<p>Got it going.&nbsp; Thank you very much for the assistance.&nbsp; For noobs like me, here is the script I created:</p><div class="codebox"><pre><code> using UnityEngine;

namespace InfinityCode.OnlineMapsDemos
{
    [AddComponentMenu(&quot;Infinity Code/Online Maps/Demos/OverlayMaps&quot;)]
    public class OverlayMaps : MonoBehaviour
    {
        public void TrafficToggle()
        {
            OnlineMaps.instance.traffic = !OnlineMaps.instance.traffic;
        }

        public void BuildingToggle()
        {
            OnlineMapsBuildings.instance.enabled = !OnlineMapsBuildings.instance.enabled;
        }

    }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (jnicol)]]></author>
			<pubDate>Sat, 24 Sep 2022 11:27:57 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8622#p8622</guid>
		</item>
		<item>
			<title><![CDATA[Re: Toggle Buildings/Traffic On/Off]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8592#p8592</link>
			<description><![CDATA[<p>Hello.</p><p>To enable/disable traffic, simply set the appropriate flag (OnlineMaps.traffic).<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMaps.html#a9eccf8d208b40f54ced486960013083d">https://infinity-code.com/doxygen/onlin … 960013083d</a></p><p>To enable/disable buildings, enable/disable Online Maps Buildings component.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sun, 18 Sep 2022 14:51:38 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8592#p8592</guid>
		</item>
		<item>
			<title><![CDATA[Re: Toggle Buildings/Traffic On/Off]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8591#p8591</link>
			<description><![CDATA[<p>Looks like I can&#039;t post the second image, but it is the UI that appears when you add the Demo script as a component to the Map GameObject in Unity.</p>]]></description>
			<author><![CDATA[null@example.com (jnicol)]]></author>
			<pubDate>Sat, 17 Sep 2022 18:31:17 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8591#p8591</guid>
		</item>
		<item>
			<title><![CDATA[Toggle Buildings/Traffic On/Off]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8590#p8590</link>
			<description><![CDATA[<p>Hi,</p><p>I have been trying to implement this functionality in a menu.&nbsp; (see pix) Got Zoom in and out going using the ZoomArea demo script.&nbsp; I have looked at the Demo script and see that there is an option to toggle traffic on/off.&nbsp; Just not sure how to implement using a button on the UI.&nbsp; </p><p>I have dragged the Map GameObject over to the On Click () function for the button and then selected the Demo, SetTraffic() function which then creates the Demo.SetTraffic function.&nbsp; (see image).&nbsp; This does not present a boolean or other option to turn this on or off so this does not work for me so I am not implementing it correctly and not sure where to go from here.&nbsp; </p><p>I think the Buildings toggle on/off would be a bit more involved.&nbsp; I am trying to turn it on or off for the building streaming on the UI to basically declutter the map if required.&nbsp; Any links to examples or posts would be greatly appreciated.&nbsp; </p><p>Not trying to get anyone to do my work, just a push in the right direction would be great!</p><p>Cheers<br />John</p>]]></description>
			<author><![CDATA[null@example.com (jnicol)]]></author>
			<pubDate>Sat, 17 Sep 2022 18:28:56 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8590#p8590</guid>
		</item>
	</channel>
</rss>
