Event Visual

1 min read

Updated on November 21, 2025

Introduction

This component contains two simple animations by code and an easy way to start and stop a particle system. It is a very basic component, and is generally made to show easy it is to hook into the events of the main components.

Setting up

Setting up is easy and just requires either the mesh visual gameobject or a particle system or both. This component should be placed onto the same gameobject as the main component itself such as a ResourceNode or ItemContainer.

See the 3d sample scene setup to see how the Unity Events are linked up with the simple functions provided in this component.

Settings

Mesh Visual
The gameobject that has the mesh object on. This should be a child of the main component like the ResourceNode or ItemContainer.

Particle System Vsiaul
Assign an Particle System component to Start and Stop a Particle System with the public functions.

Squash Y Factor
How much the SquashY function scales the Y axis of the mesh gameobject. This can be above 1 to scale up or below to scale down.

Squash Duration
How long does it take to perform the SquashY function.

Shrink To Zero Duration
How long does it take to perform the ShrinkToZero function.

Scripting

/// <summary>
/// Plays the assigned particle system
/// </summary>
public void PlayParticleSystem()

/// <summary>
/// Stops the assigned particle system
/// </summary>
public void StopParticleSystem()

/// <summary>
/// Scales the whole Transform to 0 this component is attached too
/// </summary>
public void ShrinkToZero()

/// <summary>
/// Squash the assigned MeshVisual by the SquashFactor with the SquashDuration
/// </summary>
public void SquashY()