- Home /
 
Procedural generation Sebastian Lague tutorial
HI, watching this tutorial I managed to to write exactly what they guy has in his code and understand most of it,
[tutorial address][1]https://www.youtube.com/watch?v=WP-Bm65Q-1Y [1]:
but I keep getting this error IndexOutOfRangeException: Array index is out of range. MapDisplay.DrawNoiseMap (System.Single[,] noiseMap) (at Assets/Scripts/MapDisplay.cs:18) MapGenerator.GenerateMap () (at Assets/Scripts/MapGenerator.cs:17) MapGeneratorEditor.OnInspectorGUI () (at Assets/Editor/MapGeneratorEditor.cs:20) UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1235) UnityEditor.DockArea:OnGUI()
any idea how to tackle it ? thank you for your help
Answer by Pnvanol · Oct 17, 2016 at 02:40 PM
found the problem , i put <= instead of < when creating the color array
And as a side note....he posted all the scripts on his github for you to compare your version with.
Your answer
 
             Follow this Question
Related Questions
How to remove gaps in a 2D map. 0 Answers
Unity 3 GD HotShot-Tutorial Problem with an C#-Array 1 Answer
Convert Texture2D to array of uint and back 2 Answers
Making a simple cg program work in unity 1 Answer
Unity C# - Index out of array? 2 Answers