rdInst Tutorial 4.3 – Themed Prefabs


One of the most powerful features of rdPrefabs is their ability to control what is being shown with “Themes”.

You can add themes to any object in a prefab, they will only show when you’ve added that/those themes to the Prefab (or parent Prefab). Each theme when entered is separated by a comma (,).

The objects are all stored as soft pointers, so only used objects are loaded during play.

You can leave these Prefabs As-Is in your game, they’re efficient, using shared instance manages, but there are also other options:

  • Leave as-is.
  • Convert them to SpawnActors once the level is laid out.
  • Shift singleton instances of the prefabs into place when in proximity.

To build structured theme based Prefabs is straight forward, we’ll use an example of a dining room and how to build it up – basically, the work flow is:

  • Build a “Chair” Prefab with a selection of modern, classical and worn chairs, each assigned that theme.
  • Build a “Table” Prefab with the same types and themes.
  • Build a “TableTop Scatter Prefab” with things like plates, cutlery, glasses, food etc – have various themed layouts like “banquet”, “take-out”, “empty” etc, ensure their positions are located above each of the different types of table top – if you want a combination of round and rectangular tables, set up different scatter layouts with a descriptive theme, like “roundtable,takeout” etc.
  • Build a “Rug” Prefab with whatever possibilities of rugs you want.
  • Build a “DiningArea” Prefab which contains a table, table scatter and chairs and rug.
  • Build a “DiningRoom” Prefab which contains the DiningArea, Lights, Pictures, carpet/tiles, extra furniture etc.

It keeps going up from there, you Build House Prefabs and Building Prefabs built from Floors of Rooms and Hallways etc.

This tutorial will build a simple Generic Multi-Style Dining Room from rdPrefabs.


Step 1.