<?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 — Setting marker color at runtime?]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1684</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1684&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Setting marker color at runtime?.]]></description>
		<lastBuildDate>Thu, 01 Jul 2021 11:45:43 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Setting marker color at runtime?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=7559#p7559</link>
			<description><![CDATA[<p>You are right. Was user&#039;s fault.... <br />I created random colors between 0f and 255f but it should be between 0f and 1f.<br />Sorry and thanks!</p>]]></description>
			<author><![CDATA[null@example.com (DDQ)]]></author>
			<pubDate>Thu, 01 Jul 2021 11:45:43 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=7559#p7559</guid>
		</item>
		<item>
			<title><![CDATA[Re: Setting marker color at runtime?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=7554#p7554</link>
			<description><![CDATA[<p>Hello.</p><p>Yes, this is the correct way and it works on my side (just checked).</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 28 Jun 2021 22:31:35 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=7554#p7554</guid>
		</item>
		<item>
			<title><![CDATA[Re: Setting marker color at runtime?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=7552#p7552</link>
			<description><![CDATA[<p>Hi!</p><p>I want to plot points on a map and color them depending on a specific value. </p><p>Here is my code:</p><div class="codebox"><pre><code>        foreach (KeyValuePair&lt;int, Data&gt; p  in Dataset)
        {
            OnlineMapsMarker3D newMarker = MarkerController.Create(p.Value.Longitude, p.Value.Latitude, Marker_Dot);
            newMarker.scale = 6f;
            newMarker.transform.gameObject.GetComponent&lt;MeshRenderer&gt;().material.SetColor(&quot;_Color&quot;, Color_red);
        }</code></pre></div><p>Is this the correct approach? Because the markers are not red but white. If I select one of them and check the material, the diffuse color is white. If I click on the color and the color picker opens, I can see that actually the correct color is selected here. If I pick the color from the picker and close it, the color is displayed correctly. So I assumed that you maybe need to call something on the map component to update the markers?</p><p>Thanks for your help!<br />Danish</p>]]></description>
			<author><![CDATA[null@example.com (DDQ)]]></author>
			<pubDate>Mon, 28 Jun 2021 15:26:29 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=7552#p7552</guid>
		</item>
		<item>
			<title><![CDATA[Re: Setting marker color at runtime?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=7118#p7118</link>
			<description><![CDATA[<p>Hello.</p><p>The best way is to use 3D markers (which look like 2D markers) or UI markers.<br />In this case, you can change marker color directly in renderer or UI Image / RawImage.</p><p>For 2D markers, unfortunately you can only set a new texture like in your link.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Fri, 29 Jan 2021 05:38:36 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=7118#p7118</guid>
		</item>
		<item>
			<title><![CDATA[Setting marker color at runtime?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=7115#p7115</link>
			<description><![CDATA[<p>Hello, </p><p>I have seen there is a way to &quot;get colors&quot; from OnlineMapsMarker. What are these colors about? More generally, is there an easy way to apply a color on marker textures (at creation? at runtime?), similarly to what can be done with UI ImageRaw and Image? If not, i could probably go with something like that. <a href="https://gamedev.stackexchange.com/questions/141158/how-can-i-efficiently-make-a-solid-texture2d">https://gamedev.stackexchange.com/quest … -texture2d</a></p><p>Context: I m working on a theme-able interface in a flat design approach, to allow many themes to be designed for many contents of different origins. So for the UI side, i m using greyscale sprites, and just apply a color on top of them, and the result is fine. Would be great if i could extend this approach to onlineMaps markers.</p><p>Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (emmanuel.g.blanchard)]]></author>
			<pubDate>Fri, 29 Jan 2021 00:56:16 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=7115#p7115</guid>
		</item>
	</channel>
</rss>
