#753: MapMagic 2
Status: To-do

Ok so I finally fixed my issue. I followed some suggestions provided by another individual with the same problem, although they were not using MapMagic: https://answers.unity.com/questions/1769019/urp-terrain-details-appear-with-no-texture.htmlThis got me thinking though and I studied the inner workings of MapMagic to implement a similar fix specifically for this asset. To fix my white rectangle grass issue, I had to do the following:1. Create a new, empty terrain2. Make sure all textures used for terrain details have "Read/Write Enabled" checked under the advanced import settings3. Make sure the MapMagicObject material template was set to TerrainLit, located at Packages >> UniversalRP >> Runtime >> Materials >> TerrainLit4. Modify MapMagicObject.cs, MapMagicInspector.cs, and TerrainTile.cs to inject the empty terrain's properties into created TerrainTiles.For #4, I specifically added a public Terrain object to MapMagicObject.cs and called it referenceTerrainData. I then added this code to MapMagicInspector.cs above the comment //graph://reference terrainusing (Cell.LinePx(20)){using (Cell.RowPx(50)) Draw.Label("Reference Terrain Data");using (Cell.Row){Draw.ObjectField(ref mapMagic.referenceTerrainData);}}I then modified line 413 of TerrainTile.cs, changing it from TerrainData terrainData = new TerrainData(); to TerrainData terrainData = mapMagic.referenceTerrainData;I think between the 2019 and 2020 Unity editor versions, something must've changed with how new terrain data has to be created. Creating new terrain data by calling new TerrainData() seems to screw something up, but using the editor to create a new terrain and modifying that terrain's data allows terrain details to show up properly in a standalone build.I hope this helps anyone else with this issue! It took me a week to solve this.

Created by akaWraith Mar 28, 2022, Edited Apr 2, 2022