<?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 — 2D Marker interaction Events]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=52</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=52&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in 2D Marker interaction Events.]]></description>
		<lastBuildDate>Thu, 19 Nov 2015 17:45:21 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: 2D Marker interaction Events]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=205#p205</link>
			<description><![CDATA[<p>OK will do, thanks.</p>]]></description>
			<author><![CDATA[null@example.com (nigel.moore)]]></author>
			<pubDate>Thu, 19 Nov 2015 17:45:21 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=205#p205</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2D Marker interaction Events]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=204#p204</link>
			<description><![CDATA[<p>Very interesting.<br />Please send to support a scene in which we can check it.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 19 Nov 2015 17:44:57 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=204#p204</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2D Marker interaction Events]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=203#p203</link>
			<description><![CDATA[<p>Hi </p><p>Thanks for the response but I have no objects with colliders in the scene, just a camera, a game object with the OnlineMaps components on it and a game object with the MarkerEventHandler script attached - however I did attach a script to the camera to check using RaycastAll and it finds nothing.</p>]]></description>
			<author><![CDATA[null@example.com (nigel.moore)]]></author>
			<pubDate>Thu, 19 Nov 2015 17:39:31 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=203#p203</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2D Marker interaction Events]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=202#p202</link>
			<description><![CDATA[<p>Hello.</p><p>Most likely you have some other collider over the map.<br />Use Physics.RaycastAll, to find the collider, which causes a problem.<br /><a href="http://docs.unity3d.com/ScriptReference/Physics.RaycastAll.html">http://docs.unity3d.com/ScriptReference … stAll.html</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 19 Nov 2015 17:25:48 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=202#p202</guid>
		</item>
		<item>
			<title><![CDATA[Re: 2D Marker interaction Events]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=201#p201</link>
			<description><![CDATA[<p>Ok so even if I create a new scene in the project and add only the components needed to listen for OnClick events nothing happens - but if I create a completely new barebones project then marker events are fired as expected ...</p>]]></description>
			<author><![CDATA[null@example.com (nigel.moore)]]></author>
			<pubDate>Thu, 19 Nov 2015 17:25:23 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=201#p201</guid>
		</item>
		<item>
			<title><![CDATA[2D Marker interaction Events]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=200#p200</link>
			<description><![CDATA[<p>Hi Alex,</p><p>Having some problems with events not being fired when clicking on any 2D markers in a Tileset map. In my current project everything was working as expected at first, but today the events have stopped being fired - both OnClick and OnDoubleClick - all I have done is reorder my hierarchy but have not changed any scripts. Tooltips still show for markers but not events <img src="https://forum.infinity-code.com/img/smilies/hmm.png" width="15" height="15" alt="hmm" /></p><p>Here is the code I am using (which was working until this afternoon):</p><p>public class MarkerEventHandler : MonoBehaviour <br />{<br />&nbsp; &nbsp; public delegate void ClickAction(OnlineMapsMarkerBase marker);<br />&nbsp; &nbsp; public static event ClickAction markerClickedEvent;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; // Use this for initialization<br />&nbsp; &nbsp; void Start () <br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps api = OnlineMaps.instance;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; foreach(var marker in api.markers)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; marker.OnClick += OnMarkerClick;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Debug.LogFormat(&quot;Marker {0} found&quot;,marker.label);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; <br />&nbsp; &nbsp; private void OnMarkerClick (OnlineMapsMarkerBase marker) <br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(marker.label);<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; if(markerClickedEvent != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; markerClickedEvent(marker);<br />&nbsp; &nbsp; }<br />}</p><p>The Debug.Log in Start() shows the name of the marker but OnMarkerClick() doesn&#039;t get called??</p><p>This same thing happened on a separate project the I was experimenting with as well so I tried making a unity package of all the assets and loaded it not a new project, but the same problem existed (no marker events). Only after creating a totally new project and importing the assets one by one could I get it to work ...</p><p>Have you come across this happening before? Have you any suggestions for what it might be and how I might fix it? It&#039;s quite a large project and I really don&#039;t want to have to start over again.</p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (nigel.moore)]]></author>
			<pubDate>Thu, 19 Nov 2015 17:13:42 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=200#p200</guid>
		</item>
	</channel>
</rss>
