<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Problem loading overlay]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1174&amp;type=atom" />
	<updated>2019-05-21T15:36:54Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1174</id>
		<entry>
			<title type="html"><![CDATA[Re: Problem loading overlay]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5008#p5008" />
			<content type="html"><![CDATA[<p>I think, I managed to do what I wnated. <br />I have an app, that can display building limitation in Augmented reality. When I am in 3D mode, it&#039;s the AR camera with 3D object display on the screen, when I push the `2D` button, it switch to a 2D map that I created using Online Maps, and that can display the same information but as an overlay of the map.</p><p>Before it was 2 differents scenes, I just merged the 2 scenes into one, and when I want to switch to 3D, I SetActive(false) the main camera (the one looking at the map) and I activate de AR Camera. This way, the map is not destroyed.</p>]]></content>
			<author>
				<name><![CDATA[bduinat]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=998</uri>
			</author>
			<updated>2019-05-21T15:36:54Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5008#p5008</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem loading overlay]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4994#p4994" />
			<content type="html"><![CDATA[<p>You can not just hide the map.<br />You must destroy it.</p><p>Please explain in detail what you want to do and why you need two maps.<br />In most cases this can be done with a single map.<br />I will try to explain how to do this. </p><p>This is a bug in the example.<br />The updated script is attached.<br />The new version of Online Maps will contain this.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2019-05-21T10:17:30Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4994#p4994</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem loading overlay]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4990#p4990" />
			<content type="html"><![CDATA[<p>Hum ok, what is the best way to hide a map without creating a new instance when you want it back ?<br />I tried to SetActive(false) the map, but I have the same result. When I active the object again, the overlay disappear. And I have this error message which seems relative to my overlay floder in resources:</p><p>Destroying assets is not permitted to avoid data loss.<br />If you really want to remove an asset use DestroyImmediate (theObject, true);<br />UnityEngine.Object:Destroy(Object)<br />OnlineMapsUtils:Destroy(Object) (at Assets/Infinity Code/Online maps/Scripts/Core/OnlineMapsUtils.cs:367)<br />OnlineMapsTile:Destroy() (at Assets/Infinity Code/Online maps/Scripts/Tiles/OnlineMapsTile.cs:369)<br />OnlineMapsRasterTile:Destroy() (at Assets/Infinity Code/Online maps/Scripts/Tiles/OnlineMapsRasterTile.cs:198)<br />OnlineMapsTile:UnloadUnusedTiles() (at Assets/Infinity Code/Online maps/Scripts/Tiles/OnlineMapsTile.cs:572)<br />OnlineMaps:CheckBufferComplete() (at Assets/Infinity Code/Online maps/Scripts/OnlineMaps.cs:679)<br />OnlineMaps:LateUpdate() (at Assets/Infinity Code/Online maps/Scripts/OnlineMaps.cs:999)</p>]]></content>
			<author>
				<name><![CDATA[bduinat]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=998</uri>
			</author>
			<updated>2019-05-20T22:20:50Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4990#p4990</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Problem loading overlay]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4977#p4977" />
			<content type="html"><![CDATA[<p>Hello.</p><p>If I understand your code correctly, after LoadScene you have two instances of the map.<br />But you can only have one instance of the map.<br />So you need to change the logic of switching between 2D and 3D.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2019-05-18T10:52:25Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4977#p4977</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Problem loading overlay]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4975#p4975" />
			<content type="html"><![CDATA[<p>Hi,</p><p>I&#039;m doing an application with 2 modes (3D and 2D).<br />For the 2D, I use OnlineMap, with Online data (GoogleMaps/Terrain).<br />I also have overlay, that I acces via the script TilesetMapTilerOverlayExample.</p><p>When I start the app, it works well for all level of zoom. But as soon as I switch to 3D and back to 2D. Some tiles don&#039;t have the overlay anymore at some level of zoom only.<br />It looks like all the tiles that I&#039;ve been looking at a certain level of zoom, won&#039;t appear in the next switch to 2D. </p><p>I don&#039;t understand, as I load the scene, everything should load same as a start.</p><p>public void ChangeTo2D()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; SceneManager.LoadScene(&quot;Map2D&quot;, LoadSceneMode.Additive);&nbsp; }</p><p>&nbsp; &nbsp; public void ChangeTo3D()<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; SceneManager.UnloadSceneAsync(&quot;Map2D&quot;); }</p>]]></content>
			<author>
				<name><![CDATA[bduinat]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=998</uri>
			</author>
			<updated>2019-05-17T17:36:13Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4975#p4975</id>
		</entry>
</feed>
