Helper Scripts and Other Utilities
The asset includes some extra scripts and utilities that can come in handy in some cases. Here’s a list of all of them:
The first group lives in the asset’s Scripts folder and is part of the core asset. The ones marked as demo scripts live under Demo & Assets instead, so they disappear if you delete the demo, which First Steps says you can do.

Particle System Helper (AllIn1ParticleHelperComponent.cs)
Section titled “Particle System Helper (AllIn1ParticleHelperComponent.cs)”Covered in the Particle System Helper Component section.
Look At (AllIn1LookAt.cs)
Section titled “Look At (AllIn1LookAt.cs)”Used to make a GameObject face in a particular direction. You can choose if you want the facing direction to update every frame or only on start. You can choose a Transform to be the target or target the Main Camera. Finally you can choose what axis of the transform should face the target, by default the Forward vector will be the one to face the target. But you can choose whatever axis you prefer, and Negate Direction flips it.
Bounce Animation (AllIn1VfxBounceAnimation.cs)
Section titled “Bounce Animation (AllIn1VfxBounceAnimation.cs)”It will animate the transform position back and forth over time. The starting position will be the origin point and then you can choose a Target Offset and a speed to tweak the animation.
Auto Rotate, demo script (AllIn1AutoRotate.cs)
Section titled “Auto Rotate, demo script (AllIn1AutoRotate.cs)”Rotates the transform over time around the axis of your choosing.
Auto Destroy, demo script (AllIn1VfxAutoDestroy.cs)
Section titled “Auto Destroy, demo script (AllIn1VfxAutoDestroy.cs)”The GameObject will get destroyed in N seconds after getting instantiated. This can be used when instantiating certain meshes that need to be destroyed after some time for example. If you want to clean up Particle Systems, set the Stop Action to Destroy instead (it’s a better practice since it’s cleaner and more performant).
Scroll Shader Property (AllIn1VfxScrollShaderProperty.cs)
Section titled “Scroll Shader Property (AllIn1VfxScrollShaderProperty.cs)”Takes the name (as a string, see Effects and Properties Breakdown to see the properties names) of a shader property of the current Material used in the Renderer of the current GameObject, or of the Material we pass in as a parameter, and increases or decreases its value over time. It has 3 modifiers, pick one. Apply Modulo is useful if we always want to keep the property in a certain range, like 0-360 for example. Back And Forth ensures that the property goes from the initial value to the Max Value back and forth, use the Scroll Speed property to choose the speed. Stop At Value stops the property at a value.
Scroll Shader Texture (AllIn1VfxScrollShaderTexture.cs)
Section titled “Scroll Shader Texture (AllIn1VfxScrollShaderTexture.cs)”The same idea for a texture rather than a float. It scrolls a named texture property over time, either its offset or its scale, and takes a Vector2 speed so the two axes move independently. It has the same three modifiers as the one above: back and forth between an initial and a maximum value, a modulo to keep the value in range, or stopping once a target value is reached. Leave the Material slot empty and it works on an instance of whatever material the Renderer is using.
Screen Shaker and DoShake, demo scripts (AllIn1Shaker.cs and AllIn1DoShake)
Section titled “Screen Shaker and DoShake, demo scripts (AllIn1Shaker.cs and AllIn1DoShake)”These 2 components combined can shake any GameObject Transform, but it was created as a simple but effective camera shaker that is currently used in the Demo. You can take a look at the Demo scene to see how it’s setup but the idea is to have an empty parent object for the camera and then have a child object with the actual Camera component in the 0,0,0 position. This will allow the camera to shake correctly regardless of the position and rotation of the parent object.
The DoShake component can be added to any effect that needs to shake the camera when instantiated. With Do Shake On Start ticked it will call AllIn1Shaker.i.DoCameraShake(shakeAmount); on Start, after an optional delay. Otherwise call its public DoShake() method. Since the Shaker component follows a singleton pattern you can use the above function call to activate a shake wherever needed.
Fake Light Direction (AllIn1VfxFakeLightDirSetter.cs)
Section titled “Fake Light Direction (AllIn1VfxFakeLightDirSetter.cs)”Tells the shader the light direction that the Fake Light And Shadow effect uses, from the forward vector of a target Transform (this object when the target is empty). It can set it on Awake, on Update or both, and it runs in edit mode too.
Scale Tween, demo script (AllIn1DemoScaleTween.cs)
Section titled “Scale Tween, demo script (AllIn1DemoScaleTween.cs)”This component will create a Scale Down, Scale Up procedural code animation when the function ScaleUpTween() or ScaleDownTween() is called. There are two copies, one in AllIn1Shared/Demo/Scripts that the main Demo uses and one in Demo & Assets/Textures Demo/Scripts for the textures demo. This is used in the Demo buttons and can be handy to polish UI and gameplay interactions. There are many ways to do this, but I decided to document in case it is useful for someone.
