#769: MapMagic 2
Status: To-do

see ErrorOnGeneratingWithLock folder

Hello. Not sure if the support on Gitlab is used, so I post (again) my problem here. I have an issue with grass and lock since more than a year. In short, after putting locks on terrain there is an error when I try to regenerate. It can occur after few days of work or after a month even if I change nothing on the terrain / MM Graph itself. So I'm not sure how to reproduce it, but it occured many time now. Had it on several scenes sometime with very simple MM graph, other time on very complex one.

Only way to fix it, remove the lock (losing the manual work done inside those locks), regenerate, place the lock again. Reproduced recently in Unity 2021.3.9 (with HDRP 12+) and MM 2.1.11.

I tried at some point to fix the code by myself but it started to take me too much time. So I fully commented the grass generation part in lock, it worked, but it is far from ideal and is reversed by updates.

Full error :

Thread failed: System.NullReferenceException: Object reference not set to an instance of an object at MapMagic.Locks.GrassData.Stamp (System.Int32[,] arr, System.Int32[,] stamp, Den.Tools.Coord stampOffset, Den.Tools.Coord center, System.Int32 radius) [0x00000] in D:\Project\Assets\MapMagic\Locks\LockDatas\GrassData.cs:177 at MapMagic.Locks.GrassData.WriteInThread (MapMagic.Nodes.IApplyData applyData) [0x00051] in D:\Project\Assets\MapMagic\Locks\LockDatas\GrassData.cs:56 at

https://forum.unity.com/threads/mapmagic-2-infinite-procedural-land-generator.875470/page-42#post-8414031

Created by akaWraith Sep 8, 2022