Home
  • Manual
  • Node Index
  • API
  • Changelog
Show / Hide Table of Contents
  • Tutorials
    • Creating your first map generator
      • 1. Creating your first map graph
      • 2. Running a graph at runtime
      • 3. Adding more nodes
      • 4. Object placement
    • Basic map types
      • • Cave-like maps
      • • Room-based maps
      • • Sample-based maps
      • • Combining map types
    • More Tutorials
      • • Using prefabs instead of tilemaps
      • • Changing tile/prefab/tilemap set probabilities (weighted random)
      • • Linking a named color set to tilesets/prefab sets
      • • Organizing nodes into groups
      • • Adding notes & comments
      • • Running a graph within a graph (Sub graphs)
      • • Tilemap Sets
      • • Optimization tips
      • • Static seed (daily challenges)
      • • Running a graph asynchronously/multi-threaded
      • • Object pooling
      • • Tips for rule tiles
      • • Saving and loading maps
    • Tutorials for coders
      • • Running graphs from scripts
      • • Output parameters
      • • Creating your own nodes
      • • Creating your own node views
      • • Adding a constant node type
  • Sample Project
  • Troubleshooting
  • Support

Linking a named color set to tilesets/prefab sets

Having to keep your Named Color Set synchronized with a Tileset or Prefab Set can be a bit tedious and error-prone. To avoid having to add, remove or rename a named color for each tile/prefab type you add, remove or rename, you can instead link tilesets and prefab sets to named color sets.

Let's take a look at the ways you can link sets.

Create & link Named Color Set

This is the easiest way to create a new Named Color Set that you want to link to an existing tileset or prefab set:

  1. Select the tileset or prefab set in the project window.
  2. Click "Create & link Named Color Set".

You should now see a new Named Color Set appear in the project window.

Let's say we're using this tileset to create and link a new named color set: Example Tileset

The resulting named color set will look something like this: Example Named Color Set

The colors might be different as they are chosen as random.

Things to note:

  • If you add a new tile type or prefab type in the linked set, a new named color will be added to the named color set.
  • If you remove or rename a tile type or prefab type, the linked color name will be renamed or removed as well.
  • You can't remove or rename linked colors.
  • You can still change the colors of the linked names.
  • You can still add new (unlinked) colors, which you can rename and remove.
  • The bottom part of the inspector window will show the linked sets. This is where you can link more sets.

Link existing sets

If you have an existing named color set that you want to link with a tileset or prefab set:

  1. Select the color set asset in the project window.
  2. Either click "Pick a Set" and double-click the set you want to link or drag that set from the project window onto the box.

Unlinking sets

If you no longer want a set to be linked to the named color set. Simply click "Unlink" in the inspector window.

You'll notice the colors won't be removed, but instead you can now rename and remove them: Example Tileset Unlinked

If you change your mind and want to link the set again, you can simply using the method described in the previous section.

Linking multiple sets

You can have multiple tilesets and prefab sets linked to a single named color set. This can be useful if you have a graph that generates both tiles and GameObjects from prefabs, for example.

To see which color is linked to which set(s), a tooltip is displayed, containing this information, when hovering over the color's name.

Here's how conflicts between multiple linked sets are avoided:

  • If a type is added to linked set A that, with a name that already exists in linked set B, both sets will be linked to the same named color.
  • A named color will only be removed along with the linked type if a type with the same name doesn't exist in any other linked sets.
  • When renaming a type in linked set A, with a name that also exists in linked set B, the named color won't be deleted, but the it will unlinked from linked set A and a new color is created and linked to set A instead.

If this sounds complicated, don't worry about it. The important thing to note is, that the behaviour listed here will make sure that changes made to one linked set won't interfere with another.

In This Article
Back to top Generated by DocFX