Getting Started
Play with the demo
To explore the demo scene, follow these steps:
-
Navigate to
MJG/ProceduralSlashTrail/Samples
in your project and open the Demo scene. -
In the Hierarchy, select the Character game object. Then in the Inspector, locate and open the Animator Controller.Here, you’ll find four parameters, each corresponding to a different attack. Toggle these parameters to preview different attack animations with their respective trails.
-
In the Inspector, you’ll also see an example script called AnimatorEventHandler. This script is designed to help you test the effects. You can pause and adjust the playback speed.
-
The Trail List contains the trail effects used in the demo. Each trail is attached to the character’s hierarchy at the weapon’s edge and can be trigger by animation events.
-
To view these events:
- Go to Window > Animation > Animation in the Unity toolbar to open the Animation window.
- With the Character still selected in the Hierarchy, switch between different animation clips using the dropdown menu.
- In the Animation panel, locate the event markers on the timeline. Click an event marker to reveal its details in the Inspector.
The string shown in the Inspector should match one of the trail game object’s name in the Hierarchy.
Now you can select the SlashTrail prefab and open its graph. Next, we’ll explore the trail properties.