<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Convert DrawingPoly to Mesh ...or Marker?]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1835&amp;type=atom" />
	<updated>2021-09-15T18:00:51Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1835</id>
		<entry>
			<title type="html"><![CDATA[Re: Convert DrawingPoly to Mesh ...or Marker?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7712#p7712" />
			<content type="html"><![CDATA[<p>Ok Alex, one last thing, I switched over to Tileset and I see now that my DrawingPolys are in fact game objects in the scene, however:</p><p>I am not seeing how I can apply any components to the drawing element</p><p>When I try to apply it this way: <br /></p><div class="codebox"><pre><code> myDrawingElement.instance.gameobject.AddComponent&lt;BoxCollider&gt;()</code></pre></div><p>the instance is always null--note I am trying to assign the collider right after it is added to the map....so it should be there right?</p><p>Is there another way I should be approaching this?</p><p>Currently I&#039;m getting around it by going into the source code and adding the collider when the mesh filter and renderer are added, and then once the mesh is updated with the vertices, I update the collider&#039;s size and center.</p><p>It would be nice to do this without having to dive into your code.</p><p>I&#039;m sure I&#039;m missing something</p>]]></content>
			<author>
				<name><![CDATA[mcb]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1341</uri>
			</author>
			<updated>2021-09-15T18:00:51Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7712#p7712</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Convert DrawingPoly to Mesh ...or Marker?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7710#p7710" />
			<content type="html"><![CDATA[<p>Ok thanks Alex!</p>]]></content>
			<author>
				<name><![CDATA[mcb]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1341</uri>
			</author>
			<updated>2021-09-15T13:11:01Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7710#p7710</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Convert DrawingPoly to Mesh ...or Marker?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7702#p7702" />
			<content type="html"><![CDATA[<p>You can use Drawing Element events with any control.<br />If you want to get a GameObject, this is only possible with Tileset.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2021-09-14T23:13:52Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7702#p7702</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Convert DrawingPoly to Mesh ...or Marker?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7698#p7698" />
			<content type="html"><![CDATA[<p>So I&#039;m drawing it on a 2D map, which isnt a Tileset, is there a way to do that?&nbsp; Or do I need to just switch to 3d and go with Tileset?</p>]]></content>
			<author>
				<name><![CDATA[mcb]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1341</uri>
			</author>
			<updated>2021-09-14T19:28:01Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7698#p7698</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Convert DrawingPoly to Mesh ...or Marker?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7697#p7697" />
			<content type="html"><![CDATA[<p>Hello.</p><p>If you are using a Tileset, each drawing element is a separate GameObject that you can add a Collider to and interact with.<br />Or each drawing element has events that you can use.<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMapsDrawingElement.html#a2831c1d3f6d40e4d6e520f7c3bd5d9b1">https://infinity-code.com/doxygen/onlin … 7c3bd5d9b1</a></p><p>Yes, you can use something else instead of the Drawing API, including markers or manual positioning of GameObjects. <br />But in this case, you will need to implement the drawing yourself.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2021-09-14T19:14:41Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7697#p7697</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Convert DrawingPoly to Mesh ...or Marker?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7694#p7694" />
			<content type="html"><![CDATA[<p>Currently when I create a DrawingPoly and add it to the map, it is not a selectable mesh object.</p><p>Is there a way I can convert it, maybe to a marker, or some kind of game object that can be selected after creation?</p>]]></content>
			<author>
				<name><![CDATA[mcb]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1341</uri>
			</author>
			<updated>2021-09-14T15:12:15Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7694#p7694</id>
		</entry>
</feed>
