Component Designer

Parameters

Create per-GameObject values for reusable Component Designer setups.

Parameters

Parameters let one design work with different values on different GameObjects. Use them when a shared setup needs a different target, name, number, setting, or other value on each object. The instructions and components stay the same, while each GameObject supplies its own value.

Add a Parameter

  1. Open the Parameters list in the Component Design asset.
  2. Click Add Component Parameter....
  3. Choose a parameter type.

Give each parameter a clear name so it is easy to recognize on the generated component.

Use a Parameter in a Component

Open a component entry and choose a Component Designer parameter property in a supported field. Select the parameter by name.

For example, a Trigger instruction can use a Component Designer GameObject parameter instead of a fixed scene object. The same design can then use a different GameObject on every Host.

The Host inspector shows parameter values in its headers, such as:

text
Target > Door
Message > Open

Set Parameter Values on a Host

  1. Add the generated Component Designer component to a GameObject.
  2. Open the Host inspector.
  3. Expand Parameters.
  4. Set the value for each parameter.

The value is evaluated at runtime with the Host GameObject as the normal context.