<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — How to force a redraw?]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2060&amp;type=atom" />
	<updated>2022-11-18T09:12:15Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2060</id>
		<entry>
			<title type="html"><![CDATA[Re: How to force a redraw?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8741#p8741" />
			<content type="html"><![CDATA[<p>Awesome thanks!</p>]]></content>
			<author>
				<name><![CDATA[AT_Mike]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2328</uri>
			</author>
			<updated>2022-11-18T09:12:15Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8741#p8741</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to force a redraw?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8733#p8733" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-11-17T17:46:48Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8733#p8733</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to force a redraw?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8731#p8731" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[AT_Mike]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2328</uri>
			</author>
			<updated>2022-11-17T15:13:01Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8731#p8731</id>
		</entry>
</feed>
