> 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/how-to-use.md).

# How to use

The toolkit provides procedurally generated visual effects. They can be rendered either on a UI Canvas or in world coordinates, depending on the task at hand.

## Spawn a UI visual effect as a prefab

(independent of input)

1. Open Assets → OctantaStudio → TouchEffectSystem → Prefabs → TouchEffects → PreviewEffect.
2. Duplicate this prefab and configure your own effect by replacing the Glow Material and the Sparkle Particle Prefab, or use the prefab as is.
3. Spawn this prefab in the required context. For example:

```csharp
ParticlePreviewPlayer s = Instantiate(sparkPrefab, canvas.transform); // on any UI object
s.transform.position = Vector3.zero; // you set the position yourself
```

## Spawn a 3D visual effect as a prefab

(independent of input)

1. Open Assets → OctantaStudio → TouchEffectSystem → Prefabs → WorldEffects and choose a prefab - for example, URP\_VFXRadialSparks (for URP) or VFXRadialSparks (for other render pipelines).
2. Duplicate this prefab and configure your own effect by replacing the Glow Material, or use the prefab as is.
3. Spawn this prefab in the required context. For example:

```csharp
Vector3 targetPosition = Vector3.zero; // set the target position in the world
vfxController.SpawnUniversalVfxEffect(strikeEffectPrefab, targetPosition); // spawn
```

## Add UI visual feedback for input

1. Open Assets → OctantaStudio → TouchEffectSystem → Prefabs → TouchEffects.
2. Add any effect prefab to your scene Canvas (for example, TouchInkTrail) and unpack it.
3. Check inside whether InputController → InputSystemType matches your project. Set it to Old or New.
4. Done. Run the scene to test. The effect will appear as a reaction to input.

## Create your own effects

In every case, the Glow Material is a material built from one of the toolkit's shaders. You can create your own shader and material based on the same structure, or generate new ones with the [AI prompt](/touch-effect-system-for-unity/help/prompting-and-pdf.md). If you need a custom solution, [contact us](https://www.octantastudio.com/en/) - we're happy to help, and always open to feedback that improves the Procedural VFX Toolkit.
