Asset Mage W

How to use in game

To play Special Effects in game, use the public API, which handles material animation and VFX playback:
- PlayOverlayOn(), PlayOverlayOff()
- PlayEmissionOn(), PlayEmissionOff()
- PlayHighlightOn(), PlayHighlightOff()
- PlayPulse()
- PlayDissolveOn(), PlayDissolveOff()

You can freely combine different Special Effects with each other, but if you enable certain Special Effect and then decide to disable the same Special Effect before the animation finishes, you may notice a jump in the animation.
There are few other helper functions:
- SynchronizeVFX()
If you make changes to the object's materials or change the Renderer or VFX references, call SynchronizeVFX() to ensure that the relevant data is passed to VFX.

- RebuildAnimationCache()
If you change any Animation Settings during runtime, call RebuildAnimationCache() to sync with the new values. These changes aren't expected to be frequent and this method is not intended for per-frame use.

- DisableVFX()
VFX with mesh sampling have performance cost even when they are not currently playing. Depending on how you use Special Effects, you can call DisableVFX() when no effects are playing. VFX will be automatically enabled again when you play any Special Effect.