<?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 — Is there an instance to OnlineMapsDrawingElement?]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1978</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1978&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Is there an instance to OnlineMapsDrawingElement?.]]></description>
		<lastBuildDate>Fri, 10 Jun 2022 03:51:13 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Is there an instance to OnlineMapsDrawingElement?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8360#p8360</link>
			<description><![CDATA[<p>Nevermind, I got it. I used this </p><div class="codebox"><pre><code>OnlineMaps.instance.GetComponent&lt;OnlineMapsTileSetControl&gt;().allowUserControl = false;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (moonflow123)]]></author>
			<pubDate>Fri, 10 Jun 2022 03:51:13 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8360#p8360</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is there an instance to OnlineMapsDrawingElement?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8359#p8359</link>
			<description><![CDATA[<p>Ok, one more question. Is there a way to stop the map from moving without using OnlineMaps.blockAllInteraction?</p>]]></description>
			<author><![CDATA[null@example.com (moonflow123)]]></author>
			<pubDate>Fri, 10 Jun 2022 01:54:38 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8359#p8359</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is there an instance to OnlineMapsDrawingElement?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8357#p8357</link>
			<description><![CDATA[<p>Using Drawing API - no, it was not designed to be used that way.<br />But you can use some other drawing methods like LineRenderer, GL or third party drawing assets.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 09 Jun 2022 09:08:43 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8357#p8357</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is there an instance to OnlineMapsDrawingElement?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8355#p8355</link>
			<description><![CDATA[<p>Is there a chance I can move or scale the element without having to draw it again?</p>]]></description>
			<author><![CDATA[null@example.com (moonflow123)]]></author>
			<pubDate>Thu, 09 Jun 2022 02:52:36 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8355#p8355</guid>
		</item>
		<item>
			<title><![CDATA[Re: Is there an instance to OnlineMapsDrawingElement?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8351#p8351</link>
			<description><![CDATA[<p>Hello.</p><p>If you want to get GameObject on which some element is drawn:<br /></p><div class="codebox"><pre><code>GameObject instance = element.instance;</code></pre></div><p>If you want to get an instance of the clicked element, then it is passed to the OnClick event.<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMapsDrawingElement.html#a2831c1d3f6d40e4d6e520f7c3bd5d9b1">https://infinity-code.com/doxygen/onlin … 7c3bd5d9b1</a></p><p>To get the points, cast it to its original type, and get/set the required value:<br /></p><div class="codebox"><pre><code>line.OnClick += OnLineClick;

private void OnLineClick(OnlineMapsDrawingElement element)
{
    OnlineMapsDrawingLine line = element as OnlineMapsDrawingLine;
    List&lt;Vector2&gt; points = line.points as List&lt;Vector2&gt;; // Here you need to use the type that was used when creating the line.
    Debug.Log(points.Count);
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 08 Jun 2022 09:36:55 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8351#p8351</guid>
		</item>
		<item>
			<title><![CDATA[Is there an instance to OnlineMapsDrawingElement?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8349#p8349</link>
			<description><![CDATA[<p>Hi, I wanted to ask about OnlineMapsDrawingElement, whenever we draw something be it Polygon, Line, or Rect, is there a method to get the instance of the drawing?</p><p>For example of what I&#039;m gonna do to the instance is, if I wanted to edit the drawings position or scale. And also, if I wanted to know the points of the polygon if I clicked it.</p>]]></description>
			<author><![CDATA[null@example.com (moonflow123)]]></author>
			<pubDate>Wed, 08 Jun 2022 07:26:51 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8349#p8349</guid>
		</item>
	</channel>
</rss>
