70place
0 votes Vote

index out of range in VegetationStudioTile.cs

Context: using an MM2 asset object from a different project.

problems in Vegetation tile, even after I've removed VSP output nodes from my graph.

I can suppress the error by adding a check on line 19 of VegetationStudioTile.cs (asset version is 2.0.5)
// check is at line 219:
line 219: if (cellIndex < storagePackage.PersistentVegetationCellList.Count) {

line 248: } // end the checked region on this line


Error stack (without the check) is:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at :0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at :0)
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at :0)
MapMagic.VegetationStudio.VegetationStudioTile.FlushObjects (UnityEngine.Rect terrainRect, System.Boolean clearCache) (at Assets/MapMagic/Compatibility/VegetationStudio/VegetationStudioTile.cs:221)
MapMagic.VegetationStudio.VegetationStudioTile.OnDisable () (at Assets/MapMagic/Compatibility/VegetationStudio/VegetationStudioTile.cs:82)


mmaclaurin, 05.07.2020, 11:52
Idea status: under consideration

Comments

mmaclaurin, 05.07.2020, 11:53
this suppresses the error (and finishes generation) but not sure what effect it will have on functionality

Leave a comment