> For the complete documentation index, see [llms.txt](https://octanta-studio.gitbook.io/touch-effect-system-for-unity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://octanta-studio.gitbook.io/touch-effect-system-for-unity/usage-guide/additional-world-effects.md).

# Additional: World Effects

Not only UI.

{% columns %}
{% column %}
Effects created using shaders can also be played in world space. Navigate to OctantaStudio > TouchEffectSystem > Prefabs > WorldEffects.

Use effect prefabs depending on the Render Pipeline in the project.
{% endcolumn %}

{% column %}
{% embed url="<https://youtu.be/ktrnTdK-P4o?si=wqhDmeGQ7e9Y1OUa>" %}
{% endcolumn %}
{% endcolumns %}

| Built-In                      | HDRP                          | URP                            |
| ----------------------------- | ----------------------------- | ------------------------------ |
| TemplateVFXEffect.prefab      | TemplateVFXEffect.prefab      | URPVFXEffect.prefab            |
| Prefabs without `URP_` prefix | Prefabs without `URP_` prefix | Prefabs with the `URP_` prefix |

{% hint style="success" %}
Once you've selected a prefab with the correct source material for your Render Pipeline, the only field that requires interaction is **GlowMeshPlayer > Glow Material**. Assign a custom shader-based material here.
{% endhint %}

## Ready-made examples

To add a ready-made shader-based effect to the scene:

{% columns %}
{% column width="66.66666666666666%" %}

1. Pick any effect prefab, for example RadialSparks (URP\_VFXRadialSparks for URP, or VFXRadialSparks for HDRP / Built-in RP).
2. Drag the effect prefab into the scene and run it. By default, the effect plays in a loop, which makes it easier to inspect while developing the visual.
3. Adjust the playback speed and the overall size of the MeshRenderer, which acts as the canvas for the effect. The full list of settings is available in the [GlowMeshPlayer](/touch-effect-system-for-unity/data/core-components.md#glowmeshplayer) component.
   {% endcolumn %}

{% column width="33.33333333333334%" %}

<figure><img src="https://1414976141-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnBd5BNyGKTZYEzDTuKCp%2Fuploads%2FaiAnmrQ4qpe3VEREjWL8%2Fimage_2026-03-19_23-36-12.png?alt=media&amp;token=5b2a288c-0f54-4d6d-b357-2b9bcebb6cf0" alt=""><figcaption></figcaption></figure>

<sub>*Demo Scene with examples*</sub>
{% endcolumn %}
{% endcolumns %}

To spawn the effect prefab at runtime, use VfxController.SpawnUniversalVfxEffect(). It will automatically remove the effect when the animation finishes, unless looping is enabled.

1. Drag the VfxController prefab into the scene.
2. Create a reference to VfxController from your script.
3. Create a reference to the effect object from your script.
4. Spawn the effect in the desired context. Example:

```
[SerializeField] private VfxController vfxController;
[SerializeField] private GameObject strikeEffectPrefab; // Reference for the prefab

Vector3 targetPosition = Vector3.zero; // Set the target position
vfxController.SpawnUniversalVfxEffect(strikeEffectPrefab, targetPosition); // Spawn
```

## Creating world effect

Using prefab as a template, create your own effects by only replacing the **Glow Material** in the Glow Mesh Player component. The Glow Material should be created the same way as other materials in the toolkit - it must cover the entire animation cycle of the effect, from start to finish, with smooth transparency transitions. Randomization is optional via the \_RandomSeed parameter.
