<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Is there an instance to OnlineMapsDrawingElement?]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1978&amp;type=atom" />
	<updated>2022-06-10T03:51:13Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1978</id>
		<entry>
			<title type="html"><![CDATA[Re: Is there an instance to OnlineMapsDrawingElement?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8360#p8360" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[moonflow123]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1980</uri>
			</author>
			<updated>2022-06-10T03:51:13Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8360#p8360</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Is there an instance to OnlineMapsDrawingElement?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8359#p8359" />
			<content type="html"><![CDATA[<p>Ok, one more question. Is there a way to stop the map from moving without using OnlineMaps.blockAllInteraction?</p>]]></content>
			<author>
				<name><![CDATA[moonflow123]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1980</uri>
			</author>
			<updated>2022-06-10T01:54:38Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8359#p8359</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Is there an instance to OnlineMapsDrawingElement?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8357#p8357" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-06-09T09:08:43Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8357#p8357</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Is there an instance to OnlineMapsDrawingElement?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8355#p8355" />
			<content type="html"><![CDATA[<p>Is there a chance I can move or scale the element without having to draw it again?</p>]]></content>
			<author>
				<name><![CDATA[moonflow123]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1980</uri>
			</author>
			<updated>2022-06-09T02:52:36Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8355#p8355</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Is there an instance to OnlineMapsDrawingElement?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8351#p8351" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-06-08T09:36:55Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8351#p8351</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Is there an instance to OnlineMapsDrawingElement?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8349#p8349" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[moonflow123]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1980</uri>
			</author>
			<updated>2022-06-08T07:26:51Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8349#p8349</id>
		</entry>
</feed>
