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
- Open the Parameters list in the Component Design asset.
- Click Add Component Parameter....
- 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:
Target > Door
Message > OpenSet Parameter Values on a Host
- Add the generated Component Designer component to a GameObject.
- Open the Host inspector.
- Expand Parameters.
- Set the value for each parameter.
The value is evaluated at runtime with the Host GameObject as the normal context.