Changelog
Always backup your project before updating Map Graph!
Version 1.26.2
- Fixed issue where Map Graph Input component editors wouldn't draw correctly and throw errors.
- When upgrading from v1.26 or earlier, deduplication of IDs now also migrates the input parameter values on graph runners and Map Graph Input components.
Version 1.26.1
- Fixed issue where duplicating a graph file would lead to nodes having non-unique IDs in the duplicate.
- Renamed "Waveform Function Collapse" to "Wave Function Collapse".
Version 1.26
- Added a search bar to the graph editor. You can now use Ctrl+F, or the new "Search In Graph" option in the ellipsis menu,
to open a search bar at the bottom of the editor, where you can search for:
- Nodes, reference nodes and groups by name.
- Node comments.
- Notes by title and content.
- Improved the cellular automata smoothing node:
- It no longer has a bias towards creating bottom-left to top-right looking "shapes", providing better randomness.
- Added a new "Neighbor Threshold" in port to control the amount of neighbors needed to change a cell to the fill color, which defaults to 4.
- As the new results can vary greatly from the old behavior, the old behavior is still available as the "Cellular Automata Smoothing (Legacy)" node, to avoid breaking existing graphs.
- Moved the "Open" button on the process graph nodes to the right-click context menu as the "Edit Graph" option.
- Added an "Inspect Graph" option on the process graph nodes to the right-click context menu, which selects the graph's file in the project window, displaying it in the inspector.
- Added an "Inspect Graph" option to the ellipsis menu on the graph editor window, which selects the graph's file in the project window, displaying it in the inspector.
- Added graph icon to the process graph nodes, to easily distinguish them from other nodes.
- Fixed issue where creating a new type in a set linked to a named color set, with a name that was already present in that named color set, would cause a "named already exists" warning, instead of linking it to the existing color. This would leave the named color set in an invalid state.
- Fixed issue where selected nodes would get deselected whenever a node (or nodes) were framed inside the graph editor.
- Added a check to named color set methods, to check if the set hasn't been deleted before being called by a linked set, as this was causing null reference exceptions.
Version 1.25.2
- Improved compatibility with entering play mode without domain reloads.
Version 1.25.1
- Fixed issue where newly added nodes wouldn't show up until after reloading the graph editor window.
- Renamed Random Points Per Area Node to Random Points Per Area.
- Removed log message that would appear whenever a graph editor window's position was stored.
- Manual: Added Merge Point Pairs node to the node index.
- Manual: Added Random Points Per Area node to the node index.
Version 1.25
- Added Merge Point Pairs node.
- Added Random Points Per Area node.
- Added option to add custom styling to the graph editor, by adding a MapGraph.uss file to a Resources folder in the project.
- Fixed issue where lists with exactly two items wouldn't get randomized correctly.
- Tilemap bounds are no longer compressed at runtime by Map Graph. Tilemaps should now be compressed beforehand in the editor instead.
- In addition to the position, the zoom level of open graph editor windows now also get restored, when the domain gets reloaded.
- Fixed "Connected Caves (Cellular Automata)" subgraph, so that it now works with either a texture or a size as input.
- Fixed issue where current position in a graph editor window wouldn't get restored on the first domain reload after the window was opened.
- Modified the AreaGraph class so that it doesn't directly inherit from the UndirectedGraph class anymore. This makes it possible to refer to the AreaGraph class in a custom node without requiring a reference to the QuikGraph assembly.
- Sample Project: Added the "Roguelike Map" example.
- Manual: Added the "Custom styling for the graph editor" page.
- Manual: Added the "Editor-only" section to the "Creating your own node views" page.
- Manual: Added a section on the Troubleshooting page about fixing 'The type or namespace name 'Editor' does not exist in the namespace' errors.
Version 1.24.4
- Fixed issue where the Random BSP Room node would throw an exception when a room's width or height is smaller than 1, on newer versions of Unity. A room's width and height now has a minimum of 1, whenever possible.
Version 1.24.3
- Added list of output parameters to the graph runner inspector, which shows the string representation of the latest output values.
- Fixed issue with the Generate Area Graph node, that would throw an "No Delaunay triangulation exists for this input." exception, if the areas provided have centroids that can be part of the same straight line.
Version 1.24.2
- Fixed issue where deleting an item from a list, with focus on the name field, would cause the newly selected item after deletion to be renamed to the deleted item.
Version 1.24.1
- Improved output consistency when using a static seed, particular using multi-threaded options. More specifically, when
a type entry from a (tile/prefab/tilemap) set is randomly picked for placement, it should now be the same every
time when using the same seed. - Fixed issue where the "Port is unconnected" warning wouldn't go away after connecting the affected port.
- Fixed issue that could cause Unity to crash after stopping the Visual Studio debugger followed by a domain reload.
Version 1.24
- Added Texture To Noise Data node.
- Made various change to improve multi-threading support, most importantly:
- Temporary objects are now only removed after all graph processors have completed, this avoids accidentally removing objects that are still being used by other processors.
- Made improvements to avoid different threads keep processing the graph after exiting play mode, which could cause changes to be applied in edit mode by graph processors that were started in play mode and would cause the editor to freeze when re-entering play mode.
Version 1.23.1
- Fixed issue where the Random BSP Tree node view would throw an exception if one of the node leafs has a width or height of 0.
- Fixed issue with the "Run on Awake" option, that could cause a crash on startup in standalone builds.
Version 1.23
- Added the Noise node. It's build around the FastNoise Lite library, which is now included with Map Graph. Check out the FastNoise Lite documentation for more information: https://github.com/Auburn/FastNoiseLite
- Added a button to switch between a noise data preview and a texture data preview on the Perlin Noise Fill Texture node view.
Version 1.22.3
- Fixed bug that would draw lines on the Random BSP Rooms node's preview image and log an error, in situations where the rooms would be 1 in size in either dimension.
- Fixed bug where the Replace Color node would throw an exception when find and replace colors were the same, whereas it should output the input texture and log a warning.
- Fixed the "Connected Caves (Cellular Automata)" subgraph so that it now works correctly with non-transparent texture input.
Version 1.22.2
- Fixed a bug that caused the weights on set entries to not get saved correctly, resulting in only the first entry being used.
Version 1.22.1
- Fixed a bug that would break the tile/prefab/tilemap set inspectors.
Version 1.22
- Added weights to prefab, tile and tilemap set types. Changing the weight of an entry will change the probability of it being used when generating a map.
- Min. and max. zoom level can now be set in the new settings window. Which you can find under Tools > Map Graph > Open Editor Settings.
- Added the Subtract Mask node, for subtracting one mask from another.
- Made modifications to the initialization scripts to avoid situations where the importing of Map Graph assets gets unnecessarily triggered in newer versions of Unity.
- Manual: Added "Changing tile/prefab/tilemap set probabilities (weighted random)" page.
- Manual: Fixed dead link on the Tilemap Sets page.
- Manual: Added section about coordinate system to the "Creating your own nodes" page.
Version 1.21.1
- Fixed issue where changes to input parameters wouldn't persist if the Map Graph Runner component was part of a prefab.
Version 1.21
Map Graph now requires the Editor Coroutines package. This is usually installed by default in new Unity versions. If it's not Map Graph will install it for you.
When running a graph asynchronously, the execution of code that needs to run on the main thread will now be spread over multiple frames by default, to further reduce freezing and stuttering.
The time spend on each frame can be changed on the Graph Runner component, by adjusting the "Target Time Per Frame" setting.
If you wish to restore the previous behaviour, you can uncheck the "Enable Main Thread Time Per Frame Limit" setting on the Graph Runner component.
There's now a OnProgress event on the Graph Runner component, which you can hook into to track the progress of the graph processing.
Fixed issue that kept the "Prevent Clear?" option on the Texture To Tilemap node from working correctly.
Manual: Updated the create your own node section to the manual.
Manual: Updated the section on running a graph asynchronously to the manual.
Manual: Added a section on how to use the new OnProgress event.
Version 1.20.1
- Input parameters of type Pair
can now be assigned from the inspector. - Input parameter array foldouts now open/close when clicking the label as well as the arrow icon.
- Input parameters array fields are now accompanied by a element count field, for easy resizing.
- Fixed bug where deleting an item from a input parameter of array would trigger a warning and corrupt the array.
Version 1.20
- Input parameters of array types are now assignable in the inspector, if the element type was already assignable in its singular form.
- Map Graph's serializer now uses invariant culture to serialize objects, to fix an issue where certain types, such as floats, wouldn't get stored correctly depending on the system's culture settings.
- Added "All" out port to the Areas Special Border Points node that contains all the special border points in a single set.
- Random BSP Rooms node now checks if a room is at least 1x1 in size.
- Removed the Mask and Placements output parameters from the Cellular Automata Texture subgraph, as they returned the results of the internal Randomly Fill Texture node, which is confusing.
- The "New Update" window now has a button to open the package manager and the Open Asset Store button has been reduced in size.
Version 1.19.4
- Added a link to the Map Graph Discord server to the about window.
- The "New Version" window should no longer open in a too small size.
- Ports of SaveData now have their own color and are square like for other object types.
- Added tooltips for the options on the Map Graph Runner component.
- Updated DeBroglie to version 2.0.0, which should result in better performance when using WFC.
- Updated Delaunator to version 1.0.10.
- Updated QuikGraph to version 2.5.
- Unity no longer needs to fix the namespaces when importing Map Graph in a project using Unity 2022.1 or newer.
- Manual: Updated node index.
- Manual: Updated troubleshooting page.
Version 1.19.3
Added the "Map Graph/Tile" option to the create menu to replace the "Tile" option that was removed by Unity. This allows creating single Tile assets again, without the need for creating a tile palette.
Fixed bug where Map Graph wouldn't run in multi-threaded mode in the editor with the project's build platform set to WebGL.
Multi-threading will still be disabled when in play mode, to simulate this limitation of WebGL builds.
Manual: Updated the Getting Started tutorials.
Manual: Updated troubleshooting page.
Manual: Added information about using Unity's Rule Tile system to generate game objects, instead of tiles.
Manual: Added a section about creating multiple layers using game objects to the "Using prefabs instead of tilemaps" page.
Made various minor refactoring changes.
Version 1.19.2
- Fixed broken WebGL builds, caused by the DLL conflict fix. The new solution should now resolve possible DLL conflicts without breaking WebGL builds.
- Floats assigned to Vector2Ints are now rounded down in certain cases, to avoid situations where they might be rounded up to a point that doesn't exist within a texture or bounds.
- Made some improvements to drawing lines, so that the result is more consistent.
- Improved the way exceptions are handled so that debugger features like failed node highlighting works more reliably.
- Map Graph's installed and latest versions are now displayed in Map Graph's about window.
- Attempting to set a color outside of the texture's bounds now throws an exception with a more concrete error message.
Version 1.19.1
- The included 3rd party DLLs should no longer cause conflicts with other versions of those DLLs that might exist in the project.
- Added missing license file.
- Manual: Fixed issue where documentation would get generated for non-Map Graph APIs.
Version 1.19
- Implemented system to save and load texture data.
- Fixed "Expression is always false" warning.
- Manual: Added the "Saving and loading maps" tutorial.
Version 1.18
- Added following subgraphs:
- Areas/Connect Rectangles (Centroid)
- Base/Connected BSP Rooms
- Base/Connected Caves (Cellular Automata)
- Base/Connected Equal Rooms
- Added ability to create custom preview behaviours for subgraphs.
- Added custom preview behaviour for the Random BSP Rooms subgraph.
- Added the Vector2Int To Vector2 node.
- Moved the Random BSP Rooms node to the BSP category.
- Renamed "Node Comment" option to "Add Comment".
- Attempting to copy input/output nodes from one graph to another no longer throws an exception and triggers a warning instead.
- Attempting to copy a connection between two nodes where one of the nodes won't exist in the destination graph will be skipped instead of throwing an exception.
- The updater system no longer tries to update Map Graph assets when entering playmode.
- Fixed bug that could cause the updater system to throw a null reference exception.
- Fixed issue where attempting to add a comment to a node wouldn't work in certain versions of Unity.
- Fixed issue where creating a new constant node with a text input wouldn't autofocus that textfield in certain versions of Unity.
- Fixed explicit in port types on the Multiply (Vector2) node.
- Sample Project: Added more comments and groups to some of the examples so that they're easier to read and understand.
Version 1.17.2
- Renaming a graph now reloads the editors to reflect the new names of subgraphs.
- Fixed several issues that would throw exceptions when using a 0x0 or 1x1 texture size.
- Changed a line of code that required a C# version higher than 7.3, so that Map Graph is now compatible again with C# 7.3.
- Added missing initializations for ports on newer nodes to avoid unnecessary warnings about this.
Version 1.17.1
- Note theme and font options now get persisted.
- Fixed issue where dropping a connection on the canvas from a reference node wouldn't automatically open the node creation menu.
- Multiple graph runners running the same graph will now never try to run the same graph at the same time, as it currently isn't supported and causes issues.
- Right-clicking a note in the graph editor no longer shows the Add Node and Add Group options.
- Right-clicking a note in the graph editor now shows the correct text "Note" instead of "Node" on option such as "Duplicate Note".
- Fixed bug where notes in a copied selection wouldn't be included in the selection after pasting.
- Manual: Updated the "Adding Notes" page (now the "Adding Notes & Comments" page).
- Manual: Updated the node index to include the nodes that were added in v1.17.
Version 1.17
- Nodes can now be copy/pasted from one graph to another.
- When a reference node and the node it's referring to are copy/pasted together, the copy of the reference node will now refer to the copy of node it's referring to.
- Added "Coordinates" in port to the Perlin Noise Fill Texture node, allowing for chunk-based generation.
- Added "Points Per Unit" in port to the Perlin Noise Fill Texture node. If a PPU is set, instead of the texture's dimensions, the PPU will be used to normalized point coordinates.
- Added "RNG State" in port to the Perlin Noise Fill Texture node. Passing a RNG state to this node, will make the node use that RNG state, instead the graph assigned RNG state.
- Added math nodes: Clamp (Float), Clamp (Int), Max (Float), Max (Int), Min (Float), Min (Int), Power, Square Root
- Sample Project: Added "Perlin Noise Chunks" example.
Version 1.16
- Added notes that can be added through the new right-click menu option "Add Note". Only available on Unity 2020.1 and higher.
- It's now possible to create reference nodes for process graph/subgraph nodes.
- Renamed the "Add Note" option on the nodes to "Add Comment" to distinguish between the notes on nodes and the new standalone notes.
- Added Draw Random Circles node, to generate random circles and draw them in a single step on a new or existing texture.
- Added a subgraph version of the Draw Border node, to draw the border in a single step on a new or existing texture.
- Added a subgraph version of the Random BSP Rooms node, to generate BSP rectangles in a single step.
- Added a subgraph version of the Generate Area Graph (Minimum) node, to generate a MST Area Graph in a single step.
- Added Mask out port to the Draw Border node.
- Added Mask out port to the Draw Points node.
- Added preview image to the empty texture node view.
- Right-clicking a reference node now shows the "Show Original Node" option, to easily navigate to the original node.
- Updated parts of sample project to use the new subgraph nodes.
Version 1.15
- Added Draw Random Rectangles node, to generate random rectangles and draw them in a single step on a new or existing texture.
- Added Draw Random Points node, to generate random points and draw them in a single step on a new or existing texture.
- Added Current Or Empty Texture node, to create a new texture or pass through a texture provided. Mostly useful for sub graphs.
- Added Scale Texture To node, to scale to a specific size. Helpful to deal with precision loss when scaling a texture back to its original size, for example.
- Added Extract Color node, to easier extract a color and/or the mask, in a single step.
- "Min. Fill Percentage" ports have been added to the Random Rectangles and Randomly Stamp Tilemap nodes.
- Randomly Stamp Tilemap node's "Fill Percentage" is now actually called "Max. Fill Percentage". Also updated documentation to reflect the name and behaviour change.
Version 1.14.2
- Fixed parameter list undo/redo behaviours
- Adding a parameter is now undoable and redoable.
- Undoing the deletion of a parameter on a graph that's being used as sub graph, now properly restores the matching port on the affected nodes.
- Deleting a graph asset that's used as a sub graph, now reloads all the editor windows, to reflect that change without having to reload the editor windows manually.
- Deleting a graph asset now closes its graph editor windows.
Version 1.14.1
- Fixed bug where node execution time label wouldn't get updated with object pooling disabled.
- Preparable objects, such as tilemap sets, assigned to a constant node are now prepared before running the graph.
- Adding the same tile/prefab to a set no longer triggers an exception when deserializing that set.
- Fixed bug where the Rectangles To Areas node would only add the outline points of the rectangles to their respective areas.
- Empty entries are now removed from sets when its editor gets disabled.
- Ports no longer get disconnected when their name is changed.
- The Random Rectangles and Randomly Stamp Tilemap nodes "Fill Percentage" has been renamed and fixed to function as "Max. Fill Percentage" as originally intended.
- Fixed bug where the Rectangles To Areas node would convert the rectangles to areas with their width and height reversed.
Version 1.14
Graph runners now have the option "Enable Multi-threading". Checking this option, will process nodes simultaneously on different threads wherever possible.
Introduced a pooling system to reduce memory allocations, which should avoid GC issues when generating during gameplay.
Map Graph now uses its own random number generation system, instead of .NET's System.Random.
Static random seeds can now be set as either an integer or GUID.
Area graphs are now generated using a modified version of the Delaunator library, instead of the MIConvexHull library. This improves performance and reduces the number of memory allocations.
Added addition/subtraction/multiplication/division nodes for int, float, Vector2, Vector2Int, Vector3 and Vector3int types.
These can be found under Math in the node creation menu.
Added the "Run On Awake" option to the graph runner.
Added two options to the Create menu to quickly create all the assets needed for either a tilemap-based or prefab-based Map Graph system. The new options are available in the Create menu under "Map Graph/Default Assets".
Fixed a bug where the Texture To Data node would fail when executed on a non-main thread.
Fixed bug where the last item in a data set list was selected by default, with newer versions of Unity.
Fixed autofocussing input fields on new nodes for newer versions of Unity.
Fixed issue where pasting would paste a previous selection of nodes, instead of the current one.
The script graph runner's inspector now gets repainted manually after it's done running a graph, to avoid situations where inspector remains disabled until the mouse enters the inspector.
Added a label on the graph runner inspector to display the latest execution time.
Renamed "Merge Areas Node" to "Merge Areas".
Manual: Added "Using prefabs instead of tilemaps" tutorial.
Manual: Added "Placing pre-designed tilemaps" tutorial.
Manual: Updated out-dated tutorials.
Manual: Added Areas Special Points to the node index.
Manual: Updated "Running a graph asynchronously" tutorial to include information about multi-threading.
Manual: Added "Object Pooling" tutorial.
Version 1.13.1
- Fixed an issue where an exception would occur when processing a graph asynchronously.
- Manual: Updated node index to reflect v1.13 changes.
Version 1.13
- Improved performance of the Texture To Tilemap and Texture To Tilemap Data nodes.
- Added Areas Special Border Points node.
- Added "Min. placements" in port to the Randomly Fill Texture node.
- Added "Min. Area Size" in port to the Extract Areas node.
- Points To Areas node now merges connected points into a single area, instead of simply outputting a single area for each point.
- Added "Connect Diagonals?" in port to the Points To Areas node.
- Rectangles To Areas node now merges connected rectangles into a single area, instead of simply outputting a single area for each rectangle.
- Added "Connect Diagonals?" in port to the Rectangles To Areas node.
- Added "Min. Edges" and "Max. Edges" in ports to the Add Random Edges node.
- In ports on graph nodes now require a connection if any of the corresponding input nodes in sub graph are connected to a port that requires a connection.
- Named Color node no longer has the first color as default value.
- Areas To Points node will no longer output duplicate nodes.
- Draw Areas node's Color in port is no longer required and will use transparency to draw with by default instead, similar to other nodes.
- Replace Color node will now log a warning if the find and replace colors are the same.
- Refactored nodes so that they're no longer directly coupled to a graph object.
- Various small performance improvements.
- Implemented more custom exceptions to help with troubleshooting.
- Updated MIConvexHull to latest version.
Version 1.12.1
- Fixed bug where generating an area graph would throw a NullReferenceException in certain situations.
- Fixed auto focus on new constant node fields.
- Fixed bug where creating connections from a newly added port onto the canvas, wouldn't open the node creation menu.
- Positions of empty group nodes now get properly persisted.
- Fixed bug where adding parameters wouldn't update the ports on any open associated graph nodes, if it was the first input or output parameter added.
Version 1.12
- Added Carve Radius in port to Draw Connections (Biased Random Walk) node behaviour, allowing for drawing connections of varying widths.
- Added Carve Radius in port to Random Walker node.
- Fixed a bug where the "Remove Note" option would show up for new nodes, instead of the "Add Note" option.
- Added the Color To Outline port to the Draw Outline node. Setting a color to this port will outline a specific color, instead of any non-transparent pixel.
- Added Split Into Manhattan Connections node.
- Added Extract Points node.
- Added Extract Points With Neighbours node.
- Sample Project: Added Platformer example.
- Changing a group's name to an empty string will now show as "[Untitled]" so that it remains easily selectable.
Version 1.11
- Added group nodes.
- Nodes and selections of nodes can now be cut, copy, pasted and duplicated.
- Duplicate nodes are now referred to as Reference nodes, to avoid confusion with the new duplication options.
- Holding CTRL while selecting will now exclude edges from the selection. Pressing CTRL+E will do the same for the current selection.
Version 1.10.1
- Renamed MapGraphValidator to ScriptGraphValidator.
- Validator no longer attempts to disconnect ports that have no connection.
- Fixed bug where changing a tile type entry would keep a reference to the old tile around.
- Manual: updated v1.10 changes.
- Manual: Added manual page about using notes.
- Sample Project: Removed note from example, instead adding the manual page.
Version 1.10
The sub graph system has been reworked. Instead of adding Process Graph nodes, graphs can now be added to the node creation menu, so that they can be added as nodes.
Graphs can be added to the node creation menu by flagging it as such in the graph's inspector.
Nodes based on graphs are prefixed "(G)" in the node creation menu to differentiate them from other nodes.
Existing Process Graph nodes will continue to function, but can no longer be added directly.
Default graphs have been added to use as sub graphs. These graphs are meant to avoid having to repeat some very common sequences of nodes. These are the graphs that have been added:
- Extract Area Graph (Minimum)
- Extract Areas & Draw Connections (Biased Random Walk)
- Extract Areas & Draw Connections (Manhattan)
- Extract Areas & Draw Connections (Shortest Path)
- BSP Rooms Texture
- Cave System Texture
- Cellular Automata Texture
- Perlin Noise Texture
- Random Rectangles Texture
Notes can now be added to nodes, by right-clicking a node and selecting Add Note.
Added Use XZ Plane port to the Replace GameObject Children node, which allows gameobjects to be placed on the XZ plane instead of the default XY plane.
Input nodes inside a sub graph are no longer considered to be connected, when its port isn't connected in the main graph.
Added Mask port to the Empty Texture node.
Renamed the "Texture To Tilemap" to "Texture To Tilemap Data".
Added a new Texture To Tilemap node that combines the functionality of the Texture To Tilemap Data and Copy Tilemap Data nodes.
Added Texture To Child GameObjects node that combines the functionality of the Texture To GameObjects and Replace Game Objects Children nodes.
Graphs now get validated (and repaired, if necessary) before they get loaded into the graph editor. This process removes connections to, and duplicates of, nodes that no longer exist (for whatever reason), which would cause the graph to fail to load inside the editor.
The node creation menu is now wider to fit bigger node names.
Fixed a bug where the editor windows wouldn't load properly if a multiple windows are opened for the same graph.
The constant and parameter node categories are now marked with a dot in the node creation menu to make them stand out as categories that aren't sorted alphabetically.
Sample project: Example graphs have now been updated to use the default sub graphs.
Sample project: The 3D Layers example's gameobjects now gets placed on the XZ plane instead of the XY plane.
Version 1.9
- Added Flip Texture node.
- Added Rotate Texture node.
- Added Split Vector2Int node.
- Added Offset in port to the Stamp node.
- Added Mask support to the Perlin Noise Fill Texture node.
- Renamed Generate Area Graph (MST) to Generate Area Graph (Minimum).
- Sample Project: Added RTS example.
- Manual: Updated the node index.
Version 1.8
- Added Generate Area Graph (Random) node.
- Added Add Random Edges node.
- Added Unused Edges out port to the Generate Area Graph (MST) node.
- Added Draw Connections (Biased Random Walk) node.
- Moved the Connected Points To Points node to the Convert category.
- Manual: Added the nodes added in v1.7 to the node index.
- Manual: Added a section about the Random Walker to the "Basic Map types > Cave-like maps" page.
- Manual: Added sections to the troubleshooting page and the "Creating your own nodes" page about the proper use of Rng inside a Map Graph node.
Version 1.7
- Added Random Walker node.
- Added the Scale Texture (Vector2) node. It's similar to the normal Scale Texture node, except you can assign different scales for the width (x) and height (y).
- Added Shift Texture node.
- Added Draw Grid node.
- Added Resize Texture and Change Texture Size nodes.
- Added Areas Centroid Points node.
- Added Connected Points To Points node.
- Added the [ExplicitInPortTypes] and [ExplicitOutPortTypes] attributes, which can be assigned to a node class to explicitly register port types on it. This can be used to make sure that these nodes show up in the node search menu when filtering by port type, when the ports have not been added using the [InPort] or [OutPort] attributes, but by means of the AddIn and AddOut methods instead. (An example of this are the RandomNode classes.) This will also make sure that you can add input/output parameters of those types.
- The Max. value for the Random Int, Random Vector2Int, Random Vector3Int nodes are now inclusive, as originally intended.
- The Draw Connections (Shortest Path) node's Width port now has a default value of 1, when unconnected, instead of being required.
- Sample Project: Added Roguelike (Equal Rooms) example.
Version 1.6.2
- Changed the way the Process Graph node's ports are updated whenever the selected graph's parameters are changed, in such a way that it doesn't have to reload the entire graph editor window each time a parameter is added/removed/renamed/moved. The previous method was slow and caused a bug that would make the Unity editor freeze in certain situations.
- Name fields will now get unfocused before deleting an item from a list (such as a list of input parameters or tile types), as this was causing the deleted item's name to stay in the name field, causing unintended renaming of the item selected after deletion, giving it the name of the deleted item.
- In addition to highlighting a node in the graph editor when it triggers an exception when processed, it will now also be highlighted whenever it causes an error to be logged.
Version 1.6.1
- The Process Graph node now uses default values for unconnected in ports, just like regular nodes do.
- Focus is now given to the first input field of a node, when it's first created.
- Fixed issue where deleting a parameter from a graph would sometimes throw an exception.
- Manual: Updated sample project credits section.
- Manual: Updated node index.
- Manual: Updated outdated tutorial texts.
Version 1.6
- Adding nodes to a graph is now done through a searchable window, which is accessible through the new "Add Node" option in the context menu or by pressing spacebar.
- Dragging a connection from a port into empty space, will now open up the "Add Node" menu, showing only the options compatible with that port. If a node is then created, the port will be connected to the first compatible port on the newly created node.
- The Perlin Noise Fill Texture node now has a Noise Data output port, containing the noise values generated for each point.
- The Draw Noise Threshold node has been added. It takes Noise Data and draws the given color at each point with a noise value above (or below) a given threshold onto a texture.
- Whenever a node throws an exception, the graph is now automatically opened in the editor with the failing node centered and marked red.
- Whenever a node fails a check, the graph is now automatically opened in the editor with the failing nodes centered and marked yellow.
- The Merge Areas node has been added. It takes two sets of area and merges it into one. Any overlapping areas will be merged into a single area.
- The Invert Mask node has been added.
- Added the "3D Layers" sample to the sample project.
- Whenever a graph asset gets renamed, the title of its editor window, is now updated to reflect the new name.
- The Areas To Points, Points To Areas and Rects To Areas nodes have been moved to a new "Convert" category.
- Improved fill percentage accuracy on the Random Rectangles node, especially when overlap is enabled.
- Fixed a bug where selecting a different graph on the Process Graph node, would add another help (?) button.
- Fixed a bug where a graph could break when changing the graph on a Process Graph node, while it's still connected to other nodes.
- Marked Process Graph nodes as not-duplicable for now, as it doesn't work correctly.
- Fixed a bug where renaming a type in a tileset or prefab set to an already existing name, wouldn't revert the action properly, leaving the set in an invalid state.
- Fixed a bug where deleting a prefab set or tileset linked to a named color set, would cause that named color set's inspector to break.
- Fixed a bug where the selection of a color on a Named Color node from a linked named color set, wouldn't persist.
Version 1.5.3
- Fixed bug where the "Constant?" in port was missing from the random value nodes, causing a NullReferenceException.
- If a node's class is inheriting from another node, the [InPort] and [OutPort] attributes from its parents are now also used for the child node.
Version 1.5.2
- Fixed bug where an exception would be thrown when removing the first or last type of a tile or prefab set.
- Replaced the default reorderable list headers with custom ones, as the default ones didn't show up in more recent versions of Unity.
- The "Pick a set" window will no longer erroneously trigger the validation check when closing the window without a selection.
- Manual: Added the "Basic map types" pages.
- Manual: Added the "Linking a named color set to tilesets/prefab sets" page.
- Manual: Added the "Tips for rule tiles" page.
- Manual: Updated the "Creating your first map generator" tutorials.
Version 1.5.1
- Added help buttons to nodes in the editor that link to the node's documentation on the node index page.
- Manual: Improved the node index page by adding descriptions about a node's ports.
- Manual: Added images to the node index as visual examples of what these nodes do.
- The Draw Connections (Manhattan) node's Connection Width is now optional with a default value of 1.
- Cleaned up unused variables in the Randomly Stamp Tilemaps node.
- Moved TextureToMaskNodeView and ProcessGraphNode to the correct namespaces.
- Random Points node's Percentage port now requires a connection, instead of the Mask port.
Version 1.5
- Added Waveform Function Collapse node.
- Named Color Sets can now be linked to Tilesets and Prefab Sets, meaning that for every tile/prefab type, a named color will be added automatically. Whenever a type in a linked set gets added/removed/renamed, it will be synchronized with any linked Named Color Sets accordingly.
- Each graph now gets opened in its own editor window.
- Editor window now displays the opened graph's name as the window's title.
- The script graph runner and script graph input components are now displayed as Map Graph Runner and Map Graph Input in the components menu. They are moved from the "Scripts" to the "Map Graph" category.
- Added a "Add to Scene" button to the Map Graph inspector, which adds a new game object with a Graph Runner component to the current scene and assigns the selected graph to it.
- Added a "Map Graph/Graph Runner" option to the GameObject create menu, which adds a new game object with a Graph Runner component to the current scene.
- Added Tilemap To Data node, which converts a Tilemap object to a TilemapData object.
- Added a preview image to the Texture To Mask node.
- Graph runner's Processed event is now also available as Unity Event in the inspector.
- Set a minimal width of 20 pixels for text input fields in the graph editor, so they're easier to select when they're empty or contain only one character.
- Sample Project: Added a basic Waveform Function Collapse example.
Version 1.4
Added the Process Graph node, to process other graphs inside a graph (Sub graphs).
Added the [InPort] and [OutPort] attributes as a new way for adding ports to nodes.
Adding more parameter types is now possible by using the new [InPort] and [OutPort] attributes. The types of these ports will be added as a possible input or output parameter type.
Please note that this only works when using the these attributes. Using the AddIn or AddOut methods will not add the types as possible parameter types.
An out port can now also be connected to an in port with a type that is a parent of the out port's type.
TextureData now uses a standard Color32 array instead of a native array, to avoid issues with disposing (or lack there of) when using texture data as an output parameter.
Manual: Updated the "Creating your own nodes" page.
Manual: Added a page explaining how to use sub graphs.
Version 1.3.1
The Random BSP Rooms node no longer attempts to make rooms smaller than 1x1 in size, which causes a StackOverflowException.
A duplicate node can no longer be connected to the node that it's a duplicate of.
The Texture output on the Extract Areas node is no longer the same as the Texture input. Instead it only outputs the colors for the extracted areas, as intended.
The text field of the first new type in a tileset or tilemap set is no longer unresponsive until the asset is reselected in the project window.
Fields of constant nodes with multiple fields (like vectors) are now placed below each other instead of beside each other.
This is to avoid an issue with Unity's flexing behaviour, where change in a field's width gets distributed over all the fields on that row instead of just the field that should have its width increased, causing the contents to be cut off.
Improved the workaround for exceptions thrown by the MIConvexHull library, as it didn't catch all cases.
Fixed bug where changes wouldn't show in the graph editor, if the editor was already opened on Unity startup.
Initialization script now sets graphs dirty to ensure that any changes are always persisted in standalone builds.
Sample Project: Removed unused named color and tile type from the Race Track example.
Manual: Added the tilesets, used in the new sample project examples, to the sample project page's credits section.
Manual: Updated the "Important Considerations" section of the "Creating your own nodes" page.
Version 1.3
- Sample Project: Added RPG example.
- Sample Project: Added hex strategy example.
- Sample Project: Added race track example.
- Added nodes for getting random values, specifically:
- Random Bool
- Random Color
- Random Float
- Random Int
- Random Vector2
- Random Vector2Int
- Random Vector3
- Random Vector3Int
- Added Perlin Noise Fill Texture node, which fills a texture with a Perlin noise pattern.
- Added Corner Points node, which extracts and outputs the corner points from a set of points.
- Added Areas To Points node.
- Added Draw Areas node.
- Added Texture Size node (useful to get a texture's size after scaling it, for example).
- Added extra Width ports to the Draw Outline node for different outline thickness on different sides.
- Added Connect Diagonals port to the Extract Areas node. If set to true, diagonally neighbouring pixels will be considered to be part of the same area.
- Added Outer Areas and Inner Areas output ports to the Extract Areas node, to differentiate between nodes that are touching the outer bounds and ones that aren't.
- Default width when drawing connections is now 1 instead of 0.
- Fixed bug where the graph editor would no longer show changes after having switched to another window.
- Fixed bug where changes to a tilemap wouldn't get persisted after running a graph in the editor.
- Fixed bug where the input parameter's ID would be displayed in the "parameter is not assigned" warning, instead of its name.
- Fixed bug where the changes to object set (Tilesets, Tilemap sets, Prefab sets) entries wouldn't get persisted.
- Implemented a workaround for a bug in the MIConvexHull library that would trigger a ConvexHullGenerationException in the Generate Area Graph node.
Version 1.2.1
- The graph editor no longer breaks when unsetting a loaded Graph's Named Color Set, if that graph contains any Named Color nodes. Instead the Named Color nodes' values get set to "[None]".
- Fixed undoing/redoing removing entries from a Tileset type, Prefab Set type or Tilemap Set type.
- A Named Color node's selected value now gets correctly restored after undoing the deletion of that particular value.
- Input components now show a more specific warning when no runner is set or no parameter is selected, instead of showing a generic error.
- A more specific error is now logged whenever a Tileset type, Prefab Set type or Tilemap Set type doesn't contain any entries.
Version 1.2
- Improved Map Graph's inspectors, such that list items such as parameters and named colors can now be renamed and reordered, among other improvements.
- Added the Scale Texture node, for the up or downscaling of textures, which can be used to work with tilemap grids of different sizes, for example.
- Fixed bug where the Randomly Fill Texture node's output mask wouldn't work, if no mask was provided as input.
- Added instructions to the manual on how to install the sample project manually, as an alternative to the automatic install script.
- Added a credits section to the sample project page of the manual, crediting the creators of the assets used in the sample project.
- Added a missing change to the changelog for v1.1.2: Added optional port for setting the outline's width on the Draw Outline node.
Version 1.1.2
- Made changes to how the Randomly Stamp Tilemaps node stamps tilemaps. It no longer stamps the empty
tiles within the tilemap prefab's bounding rectangle, removing any existing tiles at those points.
Please note: This change might impact your existing Map Graphs' output, as these empty tiles are no longer included in the points gotten from the Placements output port. Instead you can now get them from the new Empty Points port. - Added the Empty Points output port to the Randomly Stamp Tilemaps node, containing any empty tiles spaces within the stamped tilemap prefab's bounding rectangle.
- Added the "Create/Map Graph/Tilemap Prefab" option to the Create menu, which creates a new tilemap prefab with all the required components, as a more convenient way of creating entries for Tilemap Sets.
- Added the Map Graph Tilemap Prefab component with a Lock Shape option for tilemap prefabs with hexagonal grids.
Enabling Lock Shape on a tilemap prefab will make adjustments to tile coordinates when it's stamped onto another tilemap, so
that its shape stays the same whether it's placed on rows with different offsets or not.
More info about this issue in this forum post: https://forum.unity.com/threads/released-map-graph-node-based-random-map-generation.944568/#post-6681352 - Added the optional "Precise Margin?" input port to the Randomly Stamp Tilemaps node. Settings this to true will create a more accurate margin outline around stamped tilemaps, instead of the default bounding rectangle, at the expense of performance.
- Added the Merge Points node, which takes two sets of points and merges them together into one set.
- Added optional port for setting the outline's width on the Draw Outline node.
Version 1.1.1
- Improved the sample project installation script, so that it doesn't trigger errors when installed in a project using the 2D template.
- Made changes to "New Update" window to put more emphasize on the backup notice.
- Added a text file in the folder where the Samples.unitypackage file is located, containing installation instructions.
Version 1.1
- Added a new example to the sample project to demonstrate how to create rectangular shaped rooms using BSP nodes.
- Added checks before running a graph to output more specific error messages whenever an input parameter is unassigned or port need to be connected, instead of the generic NullReferenceException messages.
- Added the "Skip Checks" option to the Script Graph Runner component. When enabled the newly added port and input parameter checks are not performed.
- The graph view no longer gets rebuild completely each time a node is added or removed. This would make the graph editor unresponsive for a short moment. This was especially noticeable for larger graphs.
Version 1.0.2
- Both backspace and delete keys will now delete the selected elements in the Map Graph editor.
- Added "Delete" and "Delete Selection" actions to the context menu in the Map Graph editor.
- Fixed a mistake in the manual, so that it now accurately shows which key to use to delete nodes.
Version 1.0.1
- Fixed bug where a NullReferenceException would occur when adding a type to a prefab or tilemap set, before that set has ever been deserialized.
Version 1.0
- Initial release