<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — 2D Marker interaction Events]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=52&amp;type=atom" />
	<updated>2015-11-19T17:45:21Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=52</id>
		<entry>
			<title type="html"><![CDATA[Re: 2D Marker interaction Events]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=205#p205" />
			<content type="html"><![CDATA[<p>OK will do, thanks.</p>]]></content>
			<author>
				<name><![CDATA[nigel.moore]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=51</uri>
			</author>
			<updated>2015-11-19T17:45:21Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=205#p205</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 2D Marker interaction Events]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=204#p204" />
			<content type="html"><![CDATA[<p>Very interesting.<br />Please send to support a scene in which we can check it.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2015-11-19T17:44:57Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=204#p204</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 2D Marker interaction Events]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=203#p203" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[nigel.moore]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=51</uri>
			</author>
			<updated>2015-11-19T17:39:31Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=203#p203</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 2D Marker interaction Events]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=202#p202" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2015-11-19T17:25:48Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=202#p202</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 2D Marker interaction Events]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=201#p201" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[nigel.moore]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=51</uri>
			</author>
			<updated>2015-11-19T17:25:23Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=201#p201</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[2D Marker interaction Events]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=200#p200" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[nigel.moore]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=51</uri>
			</author>
			<updated>2015-11-19T17:13:42Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=200#p200</id>
		</entry>
</feed>
