<?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 — Resize With UI panel]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=223</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=223&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Resize With UI panel.]]></description>
		<lastBuildDate>Tue, 02 Aug 2016 08:49:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Resize With UI panel]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1012#p1012</link>
			<description><![CDATA[<p>0k thanx</p>]]></description>
			<author><![CDATA[null@example.com (aammfe)]]></author>
			<pubDate>Tue, 02 Aug 2016 08:49:01 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1012#p1012</guid>
		</item>
		<item>
			<title><![CDATA[Re: Resize With UI panel]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1003#p1003</link>
			<description><![CDATA[<p>Tileset - is not UI element. It is a dynamic mesh.<br />Example of how to change Tileset size depending on the size of the screen I gave above.<br />You need a little modify this example to the size of your panel.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 01 Aug 2016 09:49:37 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1003#p1003</guid>
		</item>
		<item>
			<title><![CDATA[Re: Resize With UI panel]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1002#p1002</link>
			<description><![CDATA[<p>can you provide a component , that can map , a panel to tile set ..? means just a plug and play component??</p>]]></description>
			<author><![CDATA[null@example.com (aammfe)]]></author>
			<pubDate>Mon, 01 Aug 2016 09:32:15 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1002#p1002</guid>
		</item>
		<item>
			<title><![CDATA[Re: Resize With UI panel]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=999#p999</link>
			<description><![CDATA[<p>Hello.</p><p>Basic example how to make full-screen Tileset attached.<br />I hope that helps you fine-tune it for the panel.<br />Requires Online Maps v2.4.0.54+ and Camera / Projection - Orthographic.</p><div class="codebox"><pre><code>using UnityEngine;

public class FullscreenTileset:MonoBehaviour
{
    public Camera mapCamera;

    private int tilesetWidth;
    private int tilesetHeight;
    private OnlineMaps map;

    private void Start()
    {
        map = OnlineMaps.instance;

        tilesetWidth = map.tilesetWidth;
        tilesetHeight = map.tilesetHeight;

        UpdateSize();
    }

    private void Update()
    {
        UpdateSize();
    }

    private void UpdateSize()
    {
        float height = mapCamera.orthographicSize * 2;
        float width = height * Screen.width / Screen.height;

        int h = Mathf.RoundToInt(height);
        int w = Mathf.RoundToInt(width);

        int wOff = w % 256;
        int hOff = h % 256;

        if (wOff != 0) w = (w / 256 + 1) * 256;
        if (hOff != 0) h = (h / 256 + 1) * 256;
        

        if (w &lt; 512) w = 512;
        if (h &lt; 512) h = 512;

        if (w != tilesetWidth || h != tilesetHeight)
        {
            OnlineMapsTileSetControl.instance.Resize(w, h, w, h);
            map.transform.position = map.transform.position - new Vector3((tilesetWidth - w) / 2, 0, (tilesetHeight - h) / -2);

            tilesetWidth = w;
            tilesetHeight = h;
        }
    }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 01 Aug 2016 00:44:42 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=999#p999</guid>
		</item>
		<item>
			<title><![CDATA[Resize With UI panel]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=998#p998</link>
			<description><![CDATA[<p>Hi !<br />i m integrating map with unity ui , using tileMap for mobile performance , but could not find a way to resize and position Tile map , according to refereed Rectranform ... <br />plz help me to solve this issue.&nbsp; thanx</p>]]></description>
			<author><![CDATA[null@example.com (aammfe)]]></author>
			<pubDate>Sun, 31 Jul 2016 03:46:48 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=998#p998</guid>
		</item>
	</channel>
</rss>
