<?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 — Access a marker by one of it's component and remove it]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=984</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=984&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Access a marker by one of it's component and remove it.]]></description>
		<lastBuildDate>Fri, 07 Dec 2018 19:48:56 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Access a marker by one of it's component and remove it]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4362#p4362</link>
			<description><![CDATA[<div class="codebox"><pre><code>OnlineMapsControlBase3D.instance.RemoveMarker3D((OnlineMapsMarker3D)waypoints[i].gameObject.GetComponent&lt;OnlineMapsMarker3DInstance&gt;().marker);</code></pre></div><p>It&#039;s working, thanks <img src="https://forum.infinity-code.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></description>
			<author><![CDATA[null@example.com (Thibault)]]></author>
			<pubDate>Fri, 07 Dec 2018 19:48:56 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4362#p4362</guid>
		</item>
		<item>
			<title><![CDATA[Re: Access a marker by one of it's component and remove it]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4360#p4360</link>
			<description><![CDATA[<p>Hello.</p><p>To remove the 3D marker, use OnlineMapsControlBase3D.RemoveMarker3D.<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsControlBase3D.html#ac98b7909b93d611d87377e46c15d2eae">http://infinity-code.com/doxygen/online … 46c15d2eae</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Fri, 07 Dec 2018 19:38:45 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4360#p4360</guid>
		</item>
		<item>
			<title><![CDATA[Access a marker by one of it's component and remove it]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4359#p4359</link>
			<description><![CDATA[<p>Hi,</p><p>I&#039;m trying to remove some markers using OnlineMaps.RemoveMarker(OnlineMapsMarker marker)</p><p>The thing is, i don&#039;t have a reference of the marker i want to remove, but a reference of one of it&#039;s component.</p><div class="codebox"><pre><code>public Waypoint[] waypoints; //Waypoint is a c# script that is attached to a marker 3D</code></pre></div><div class="codebox"><pre><code>for (int i = 0; i &lt; waypoints.Length; i++)
        {
            //Destroy(waypoints[i].gameObject);   // FAIL -&gt; the marker is not destroyed
            map.RemoveMarker((OnlineMapsMarker)waypoints[i].gameObject.GetComponent&lt;OnlineMapsMarker3DInstance&gt;().marker); //this compile but fail while running with error : &quot;Cannot cast from source type to destination type.&quot;
        }</code></pre></div><p>I tried several different formula to remove the markers but can&#039;t find a working solution. How to remove a marker by it&#039;s instance ?</p>]]></description>
			<author><![CDATA[null@example.com (Thibault)]]></author>
			<pubDate>Fri, 07 Dec 2018 19:15:09 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4359#p4359</guid>
		</item>
	</channel>
</rss>
