This was a collection of helper classes for Hollow Knight mods.
Helper for Unity projects are also included.
- Have a GameObject
- Put the MapGenerator Component on it
- Optional: you can also add a MeshRenderer, to look what the mesh looks like
- Set the desired width, height, seed and fill percentage
- Go into "play mode" (click the play button at the top of the editor)
- Right-click the MeshFilter on the GameObject and select "Generate Map"
- Wait a bit
- With the optional MeshRenderer, you can now see the generated mesh
- To save the mesh, right-click the MeshFilter and select "Save Mesh as OBJ..."
- Now just pick where you want it saved
- Now you can load that saved mesh as terrain or you can edit it further in another software
- Have a GameObject
- Put a MeshFilter Component on it
- Select a mesh for the MeshFilter
- Right-click the MeshFilter on the GameObject and select "Create Collision"
- This will add a PolygonCollider2D on the GameObject