World Building

Checked with version: 2018.1


Difficulty: Beginner

Instance Painter

The instance painter component is a tool which is designed to assist you in the creation of your scene, inside the Unity Editor. It has no-use in Play mode or in a build. It allows you to paint prefabs across your scene, doing the placement of each instance for you.

  • Layer Mask: The instance painter will only paint on top of objects in these layers.

  • Root Transform: This is a Game Object under which all painted instances will be parented.

  • Brush Radius: The size of the brush around the mouse cursor.

  • Brush Height: The height of the brush around the mouse cursor.

  • Brush Density: A large value here will create more instances within your brush area, a lower value will create less.

  • Max Random Rotation: Painted instances will be randomly rotated within this range.

  • Rotation Step: If this value is greater than 0, the random rotation applied to the painted instance will be quantized to this value.

  • Collision Test: The painter will automatically remove intersecting instances when you are painting. It can do this using the volume specified by Renderer Bounds, or the Collider Bounds.

  • Max Intersection Volume: The percentage that each instance volume is allowed to intersect with other instance volumes.

  • Max Slope: The maximum gradient of the surface that the painter will use for positioning instances.

  • Prefab Palette: This is the list of prefabs which can be painted. Each prefab here will result in a button representing the prefab appearing in the inspector.

  • Align to Normal: If true, each painted instance will be oriented to the surface normal, otherwise will be oriented to the world up vector.

  • Follow Surface: If true, the brush will orient itself to the surface normal under the mouse cursor, otherwise will be oriented to the world up vector.

  • Randomize each Stamp: If true, the stamp (items that are placed within the brush area) will be randomized on each click. Otherwise, you will need to press the spacebar to create a new stamp.

  • Variations Panel: This panel is only visible on prefabs which have a variations component. This component allows a prefab to substitute itself with different versions and different scales.

    • Min Scale: Painted instances can be randomly scaled, this is the minimum of the scale range.

    • Max Scale: Painted instances can be randomly scaled, this is the maximum of the scale range.

    • Game Objects: The list of potential substitutes for this instance.

Pressure Pad

The pressure pad is automatically set up so that when the player walks on it, it lights up and plays a sound. You can connect the pressure pad to trigger events like opening a door.

The majority of the functionality for this prefab comes from two scripts:

  • Send On Trigger Enter: Generates all manner of gameplay interactions. This is part of the command system. The Send On Trigger Enter script fields are summarised below. For full details on using the command system, see the command system page.

    • Interaction Type: Default Setting: Open The type of command that the pressure pad will send. It functions purely as a label but is there to make sense of multiple interactions. If the pressure pad is used to open a door then Open would be a good choice. If it deactivates a trap, then Deactivate makes sense.

    • Interactive Object: This is the Game Command Receiver that will react to the pressure pad being used. For example, a door if the pressure pad is meant to open a door.

    • One Shot: Default Setting: true Whether the pressure pad can be used more than once. By default it can only be used once.

    • Cool Down: Default Setting: 1 How long before the pressure pad can be used again if it is not a One Shot. By default this setting has no effect.

    • On Send Audio: The audio source to play when the pressure pad is stepped on.

    • Audio Delay: Default Setting: 0 How long after the pressure pad is stepped on before the audio plays.

    • Layers: Default Setting: Player The layers that game objects can be on to activate the pressure pad. By default only Ellen can activate a pressure pad so the layer is set to just Player.

  • Interact On Trigger: Plays an animation when Ellen stands on the pad.