<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Regenerating buildings]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1883&amp;type=atom" />
	<updated>2021-12-09T23:02:57Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1883</id>
		<entry>
			<title type="html"><![CDATA[Re: Regenerating buildings]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7960#p7960" />
			<content type="html"><![CDATA[<p>Each terrain has a meta component in the scene that contains the full generation settings.<br /><a href="https://infinity-code.com/doxygen/real-world-terrain/classInfinityCode_1_1RealWorldTerrain_1_1RealWorldTerrainMonoBase.html#a01a680666730276057be9e348bff3166">https://infinity-code.com/doxygen/real- … 348bff3166</a><br />You can iterate over all RealWorldTerrainItem&#039;s once and set the necessary settings.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2021-12-09T23:02:57Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7960#p7960</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Regenerating buildings]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7959#p7959" />
			<content type="html"><![CDATA[<p>Thanks Alex. </p><p>The thing is, once stablish a sort of prefabs for a terrain, I can&#039;t find a way to change them if it&#039;s not one by one.<br />It would be nice to be able to specify the prefabs to load for a set of terrains, just as you do for a single terrain when regenerating additional.<br />Is there no way to overwrite the list of prefabs for each terrain?</p><br /><p>RealWorldTerrainWindow.OpenWindow(RealWorldTerrainGenerateType.additional, item);<br />RealWorldTerrainWindow.prefs.elevationType = RealWorldTerrainElevationType.heightmap;<br />RealWorldTerrainWindow.prefs.generateBuildings = true;<br />RealWorldTerrainWindow.prefs.buildingGenerator = 3;<br />RealWorldTerrainWindow.prefs.buildingPrefabs = houses;&nbsp; //List</p><p>foreach (RealWorldTerrainItem item in items)<br />{<br />&nbsp; &nbsp; &nbsp;// Overwrite the prefabs list for this item(terrain)???</p><p>&nbsp; &nbsp; &nbsp;foreach (RealWorldTerrainBuildingPrefab house in houses)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;house.sizeMode = RealWorldTerrainBuildingPrefab.SizeMode.originalSize;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;house.heightMode = RealWorldTerrainBuildingPrefab.HeightMode.levelBased;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;house.placementMode = RealWorldTerrainBuildingPrefab.PlacementMode.lowerCorner;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />}<br />Sorry for insist in this but, I&#039;m pretty sure there must be some solution.<br />Thanks for your time.</p>]]></content>
			<author>
				<name><![CDATA[quarrytroopers]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1209</uri>
			</author>
			<updated>2021-12-09T09:52:56Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7959#p7959</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Regenerating buildings]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7942#p7942" />
			<content type="html"><![CDATA[<p>1. You can store your prefabs in any project folder and it can have any name.<br />For RWT, it doesn&#039;t matter at all.</p><p>2. Unfortunately, no, you cannot change this for existing buildings.</p><p>3. Unfortunately, I did not understand your description of the problem with a small town.<br />Try to rephrase this in more detail.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2021-12-02T23:27:50Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7942#p7942</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Regenerating buildings]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7939#p7939" />
			<content type="html"><![CDATA[<p>Hello Alex.</p><p>Thanks for answering.</p><p>Ok. In trying to regenerate the buildings for some tiles of the all map (see 364), using prefabs. <br />Using the script attached.</p><p>My doubt is, in which way the prefabs are instanciated? It have been uses those prefabs included in the RealWorldTerrain main window or I have to specify a folder? If I have the prefabs in a different directory that the terrain container, do I should modify line 69: &quot;string path = item.container.folder;&quot;?</p><p>Said in other way, can I stablish from witch folder the prefabs has to be load? Or I have to use the RealWorldTerrain main window to put the prefabs manually?</p><p>So then, can I stablish the &quot;Placement mode&quot; through the script, for those loaded prefabs? If yes, how I write this? I don&#039;t find it in the documentation.</p><p>Also I getting problems to get buildings even using the main RWT window. Is there some limitation (cadastre related) about small town in center Europe?</p><p>Thanks,</p>]]></content>
			<author>
				<name><![CDATA[quarrytroopers]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1209</uri>
			</author>
			<updated>2021-12-02T13:38:13Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7939#p7939</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Regenerating buildings]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7935#p7935" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Unfortunately I didn&#039;t understand your question about the prefab path.<br />Please rephrase this in more detail.</p><p>Placement Mode is inside RealWorldTerrainBuildingPrefab class.<br />You need to set the list of items (RealWorldTerrainWindow.prefs.buildingPrefabs) and for each item you can specify the desired Placement Mode.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2021-12-01T21:33:07Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7935#p7935</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Regenerating buildings]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7932#p7932" />
			<content type="html"><![CDATA[<p>Hi Alex.</p><p>I&#039;m trying to regenerate buildings for a few tiles at once.<br />I created a little tool with the code you pass me.<br />Now I found in the forum a related script you shared about generate building.</p><br /><p>Just need a little help with the prefabs.<br />On: &quot;path += &quot;/&quot; + RealWorldTerrainBuildingGenerator.baseContainer.name + &quot;.prefab&quot;;&quot; I just should to put my prefab&#039;s folder in the &quot;/&quot; thing, right?<br />Then, to set the &quot;Placement Mode&quot; to Lower Corner, I didn&#039;t find the field. Could do you show it? BottomMode?</p><p>Thanks, again.<br />Joan</p>]]></content>
			<author>
				<name><![CDATA[quarrytroopers]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1209</uri>
			</author>
			<updated>2021-12-01T15:14:22Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7932#p7932</id>
		</entry>
</feed>
