<?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 — How to force a redraw?]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=2060</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2060&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to force a redraw?.]]></description>
		<lastBuildDate>Fri, 18 Nov 2022 09:12:15 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to force a redraw?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8741#p8741</link>
			<description><![CDATA[<p>Awesome thanks!</p>]]></description>
			<author><![CDATA[null@example.com (AT_Mike)]]></author>
			<pubDate>Fri, 18 Nov 2022 09:12:15 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8741#p8741</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to force a redraw?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8733#p8733</link>
			<description><![CDATA[<p>Hello.</p><p>You need to reset the tile manager. <br />Something like:<br /></p><div class="codebox"><pre><code>using UnityEngine;

namespace InfinityCode.OnlineMapsSupport
{
    public class ChangeResourcesPath : MonoBehaviour
    {
        public string path1 = &quot;OnlineMapsTiles/type1/{zoom}/{x}/{y}&quot;;
        public string path2 = &quot;OnlineMapsTiles/type2/{zoom}/{x}/{y}&quot;;

        private void OnGUI()
        {
            if (GUILayout.Button(&quot;Change&quot;))
            {
                OnlineMaps.instance.resourcesPath = OnlineMaps.instance.resourcesPath == path1 ? path2 : path1;
                OnlineMaps.instance.tileManager.Reset();
                OnlineMaps.instance.Redraw();
            }
        }

        private void Start()
        {
            OnlineMaps.instance.resourcesPath = path1;
        }
    }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 17 Nov 2022 17:46:48 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8733#p8733</guid>
		</item>
		<item>
			<title><![CDATA[How to force a redraw?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8731#p8731</link>
			<description><![CDATA[<p>Hello all,</p><p>I have two map tile sets that are in the resources folder. I have a basic toggle that changes the resourcesPath on button press, and then call RedrawImmediately expecting this to load the second tile set.<br />This doesn&#039;t work, however, as I seem to be missing a step. It does display the new map but only for newly loaded tiles when either the user scrolls or zooms out.</p><p>Just wondering how I should go about reloading the map using the new resourcesPath?</p><p>I&#039;ve tried calling redraw, redraw immediately, and changing the variables that state whether a redraw should occur.</p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (AT_Mike)]]></author>
			<pubDate>Thu, 17 Nov 2022 15:13:01 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8731#p8731</guid>
		</item>
	</channel>
</rss>
