# Buildable Object Effects

The **Buildable Object Effects** component located in: <mark style="color:purple;">**SoulGames > Easy Grid Builder Pro 2 > Scripts > Grid Visuals Scripts**</mark> provides visual, audio, and interaction effects for buildable objects within the Easy Grid Builder Pro 2 system. These effects include animations during spawning, spawning objects during spawning and destruction, material changes during interactions, and sound effects to enhance user feedback. Simply put this component adds a great final polish to your Buildable Objects.

<figure><img src="https://2651556506-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeumhICLT4oHoEIEssOjB%2Fuploads%2FmqyNOgvKZE1RlyLQyVhG%2Fimage.png?alt=media&#x26;token=58bcd4e9-d33e-4ff0-8722-a79cc40fb920" alt=""><figcaption></figcaption></figure>

***

## <mark style="color:green;">Spawn Effects</mark>

You can add scaling and positioning animations to your Buildable Objects using customizable animation curves with this section of the component. Also additionally you have the option to spawn additional game objects on creation. (Ex: Particle effects)

### <mark style="color:orange;">Scaling Effect</mark>

<table data-full-width="false"><thead><tr><th width="216">Property</th><th width="429.3333333333333">Function</th><th>Required</th></tr></thead><tbody><tr><td>Use Scaling Effect On Spawn</td><td>Enables scaling animation on spawn</td><td>No</td></tr><tr><td>Block Scalling Effect For Ghost Object</td><td>Prevents scaling effects for ghost objects while attempting to place them on the grid</td><td>No</td></tr><tr><td>Scaling Affect X Axis</td><td>Determines the X axis is affected by scaling</td><td>No</td></tr><tr><td>Scaling Affect Y Axis</td><td>Determines the Y axis is affected by scaling</td><td>No</td></tr><tr><td>Scaling Affect Z Axis</td><td>Determines the Z axis is affected by scaling</td><td>No</td></tr><tr><td>Scale Effect Animation Curve</td><td>Defines the scaling animation curve. (Time and Scale)</td><td>No</td></tr><tr><td>Target Scale</td><td>Final scale after the animation is complete (once the scaling animation reaches this scale value it will stop)</td><td>No</td></tr></tbody></table>

### <mark style="color:orange;">Positioning Effect</mark>

<table data-full-width="false"><thead><tr><th width="216">Property</th><th width="429.3333333333333">Function</th><th>Required</th></tr></thead><tbody><tr><td>Use Position Effect On Spawn</td><td>Enables positioning animation on spawn</td><td>No</td></tr><tr><td>Block Position Effect For Ghost Object</td><td>Prevents positioning effects for ghost objects while attempting to place them on the grid</td><td>No</td></tr><tr><td>Position Affect X Axis</td><td>Determines the X axis is affected by positioning </td><td>No</td></tr><tr><td>Position Affect Y Axis</td><td>Determines the Y axis is affected by positioning </td><td>No</td></tr><tr><td>Position Affect Z Axis</td><td>Determines the Z axis is affected by positioning </td><td>No</td></tr><tr><td>Position Effect Animation Curve</td><td>Defines the positioning animation curve. (Time and Position)</td><td>No</td></tr></tbody></table>

### <mark style="color:orange;">Spawn Game Objects</mark>

<table data-full-width="false"><thead><tr><th width="216">Property</th><th width="429.3333333333333">Function</th><th>Required</th></tr></thead><tbody><tr><td>Use Spawn Game Objects On Spawn</td><td>Enables spawning objects on spawn</td><td>No</td></tr><tr><td>Spawn Game Object List</td><td>List of objects to spawn</td><td>No</td></tr><tr><td>Prevent Spawn In Ghost Mode</td><td>Prevents spawning objects on ghost object mode while attempting to place them on the grid</td><td>No</td></tr><tr><td>Spawn Random One From List</td><td>Spawns only one random object from the list</td><td>No</td></tr><tr><td>Spawn Local Position</td><td>Custom position for spawned objects</td><td>No</td></tr><tr><td>Spawn Local Rotation</td><td>Custom rotation for spawned objects</td><td>No</td></tr><tr><td>Spawn Local Scale</td><td>Custom scale for spawned objects</td><td>No</td></tr><tr><td>Spawnned Object Lifetime</td><td>The lifetime of spawned objects (destroyed after this time)</td><td>No</td></tr></tbody></table>

***

## <mark style="color:green;">Destroy Effects</mark>

You can spawn additional game objects on Buildable Object Destruction. (Ex: When you destroy a built object you can spawn an explosion Particle effect)

### <mark style="color:orange;">Spawn Game Objects</mark>

<table data-full-width="false"><thead><tr><th width="216">Property</th><th width="429.3333333333333">Function</th><th>Required</th></tr></thead><tbody><tr><td>Use Spawn Game Objects On Destroy</td><td>Enables spawning objects during destruction</td><td>No</td></tr><tr><td>Spawn Game Object List</td><td>List of objects to spawn</td><td>No</td></tr><tr><td>Spawn Random One From List</td><td>Spawns only one random object from the list</td><td>No</td></tr><tr><td>Spawn Local Position</td><td>Custom position for spawned objects</td><td>No</td></tr><tr><td>Spawn Local Rotation</td><td>Custom rotation for spawned objects</td><td>No</td></tr><tr><td>Spawn Local Scale</td><td>Custom scale for spawned objects</td><td>No</td></tr><tr><td>Spawnned Object Lifetime</td><td>The lifetime of spawned objects (destroyed after this time)</td><td>No</td></tr></tbody></table>

***

## <mark style="color:green;">Interaction Effects</mark>

With Interaction Effects, you can add Change Buildable Object's material on hover, selection, and movement states easily.  Additionally, you can exclude objects that should not be affected by the material change. Also, you add audio feedback for interactions such as hover enter/exit, and selection.

### <mark style="color:orange;">Material Changes</mark>

<table data-full-width="false"><thead><tr><th width="216">Property</th><th width="429.3333333333333">Function</th><th>Required</th></tr></thead><tbody><tr><td>Change Object Material</td><td>Enables material changes during interactions</td><td>No</td></tr><tr><td>Root Object</td><td>The root game object to which the material change should be applied</td><td><mark style="color:red;">Yes</mark></td></tr><tr><td>Exclude Child Objects</td><td>Child game objects of the Root Object to exclude from the material change</td><td>No</td></tr><tr><td>Base Material</td><td>Default material of the object. (the original material of the object)</td><td>No</td></tr><tr><td>Destroyer Hover Change Material</td><td>Material applied during Destroy Mode hover</td><td>No</td></tr><tr><td>Selector Hover Change Material</td><td>Material applied during Select Mode hover</td><td>No</td></tr><tr><td>Selector Selected Material</td><td>Material applied when Select Mode selected</td><td>No</td></tr><tr><td>Mover Hover Change Material</td><td>Material applied during Move Mode hover</td><td>No</td></tr></tbody></table>

### <mark style="color:orange;">Sound Effects</mark>

<table data-full-width="false"><thead><tr><th width="216">Property</th><th width="429.3333333333333">Function</th><th>Required</th></tr></thead><tbody><tr><td>Make Sound Effect</td><td>Enables sound effects</td><td>No</td></tr><tr><td>Destroyer Hover Enter Audio Clip</td><td>Audio clip to play during Destroy Mode hover enter</td><td>No</td></tr><tr><td>Destroyer Hover Exit Audio Clip</td><td>Audio clip to play during Destroy Mode hover exit</td><td>No</td></tr><tr><td>Selector Hover Enter Audio Clip</td><td>Audio clip to play during Select Mode hover enter</td><td>No</td></tr><tr><td>Selector Hover Exit Audio Clip</td><td>Audio clip to play during Select Mode hover exit</td><td>No</td></tr><tr><td>Selector Selected Audio Clip</td><td>Audio clip to play during Select Mode selected</td><td>No</td></tr><tr><td>Selector Deselected Audio Clip</td><td>Audio clip to play during Select Mode deselected</td><td>No</td></tr><tr><td>Mover Hover Enter Audio Clip</td><td>Audio clip to play during Move Mode hover enter</td><td>No</td></tr><tr><td>Mover Hover Exit Audio Clip</td><td>Audio clip to play during Move Mode hover exit</td><td>No</td></tr><tr><td>Mover Start Moving Audio Clip</td><td>Audio clip to play during Move Mode start moving</td><td>No</td></tr><tr><td>Mover End Moving Audio Clip</td><td>Audio clip to play during Move Mode end moving</td><td>No</td></tr></tbody></table>

***

## <mark style="color:green;">Usage Instructions</mark>

This component is specifically designed for use with **Easy Grid Builder Pro 2 Buildable Objects**. After creating your Buildable Objects, attach this component to the root game object (the same object where the **Buildable Grid / Edge / Corner / Free Object** component is attached). Then, configure the necessary properties to suit your needs.

You can inspect the **Buildable Objects** used in the **Easy Grid Builder Pro 2 Demo** scenes. Most of these objects have the **Buildable Spawn Effects** component attached to them.
