Query Interface
note
This feature is available from Version 1.8.0
and above
Use the Query Interface to query different parts of your grid flow dungeon. These are great for selectively decorating your dungeons or for any gameplay specific needs
Use this to selectively decorate your dungeons based on various conditions
- Decorate Caves, Rooms and Corridors differently
- Custom decorations on different paths (e.g. Treasure Room, Shops, Main Path, Alt Path, Key Rooms etc.)
#
SetupSelect the Grid Flow Dungeon game object and make sure GridFlowDungeonQuery
script is added to it. If not, add it
note
Do not add this script if it's already attached to the game object
#
Query Room TypeDecorate your dungeons based on the room type (e.g. Room, Cave, Corridor)
note
Check the samples here: Assets/CodeRespawn/DungeonArchitect_Samples/DemoBuilder_GridFlow_Query
Create a selector rule script like below:
Notice the last line return roomType == GridFlowLayoutNodeRoomType.Cave;
Check for your room type here.
Attach this script to the theme nodes that are used to selectively decorate the caves
#
Query Path NameDecorate your dungeons based on the path (e.g. Shops, Treasure Rooms, Main Path, Alt Path etc)
Create a selector script as shown below and specify your path name there
Attach this script to the theme nodes you'd like to decorate