Click or drag to resize
In-Editor Generation

The Tile-Based Worlds framework has been designed first and foremost as a collection of run-time utilities, to allow building and interacting with topologies through user scripts. But sometimes these topologies can be fully created beforehand, and so editor integration has been included to assist in these cases.

Use of these editor interfaces is done through the inspector of the GeneratorExecutive objects. These can be created through the Assets/Create/Make It Tile menu, and will be populated with a default set of data and object generators. The interface closely mimics the standard inspector interface, with each generator presented similarly to how components are presented on a game object. But generators also strongly follow a node-based model, where generators may have a variety of inputs and outputs and connect up to each other as needed.

Once all desired generators have been added and configured, the Generate button at the top of the inspector can be pressed to run all generators. Depending on how each output is configured and consumed, some outputs will be saved as assets within the same folder as the root generator asset, or under subfolders. Common assets such as meshes and prefabs can be used directly in scenes as normal, and will be updated in place if the data is regenerated with different settings. Custom data (classes deriving from ScriptableObject) can be used within user scripts, or referenced by custom components that understand the particular data type.

By default, each generator's outputs are collapsed in the inspector. Expanding will show an abbreviated list of outputs, with their names, data types, and a toggle to enable or disable them. Each output can be further expanded, permitting the adjustment of its name, path (subfolder where it is saved), and more details on its type (mouseover to get a fully namespaced tooltip). Additionally, its availability can be edited. "Available During Generation" means that other generators can use this output as incoming data, but it won't be saved as a distinct asset file for use later on. "Available After Generation" will hide the output when hooking up the inputs of other generators, but will still be saved as an asset file. "Available Always" naturally combines the two. Unchecking the "Enabled" toggle will essentially mark it as "Never Available", neither usable by other generator nor saved as an asset.

Each collection of generators tracks which assets where generated by its own generators, and will cleanup leftover assets when configurations change and regeneration creates fewer or a different set of outputs. If for some reason you want to detach generated assets and use them in their current form independently from the generator, you can click the "Detach Assets" button near the top of the inspector, and then move the assets to a location where they won't get overwritten by another generation pass.

Moving a collection of generators is as easy as moving or renaming the folder. Alternatively, you should be able to move just the "Generator" asset and then regenerate the assets, and everything ought to be moved into the same folder as that asset.

If you would like to copy a collection of generators so that you can modify and generate similar but altered assets, you can alt-drag the "Generator" asset to copy it to a different folder. This copy will know to drop all associations with existing generated assets, and will therefore create entirely new assets when the Generate button is pressed, leaving the original assets untouched.

If the provided generators are not sufficient, additional custom generators can be created using those in the Experilous.MakeItTile namespace and derived from Generator as a model.

See Also