Skip to content

Spring Components

Spring Components, such as TransformSpringComponent, CamFovOrSizeSpringComponent, AudioSourceSpringComponent, ShaderFloatSpringComponent, UiSliderSpringComponent and others are concrete implementations of the SpringComponent class. All of them are reachable from the Add Component menu under AllIn1SpringsToolkit/.

A component wraps one or more spring types and exposes them through its own methods, plus whatever else that particular component needs. The naming follows one rule across all fourteen, and the API Reference spells it out.

The springs themselves are private on most components, so that API is the whole surface. If something you need is missing, the answer is usually to write your own component around a raw spring type rather than to reach inside an existing one.

Add one of these, set it up in the Inspector, and it animates the property it owns:

  • TransformSpringComponent - Applies spring animation to a GameObject’s position, rotation, and scale. The usual starting point
  • RotationSpringComponent - Rotation only, when you don’t need the position and scale springs
  • RigidbodySpringComponent - Applies spring animation to the position and rotation of a Rigidbody, so the springs cooperate with physics instead of fighting it
  • AnchoredPositionSpringComponent - Applies spring animation to the anchored position of a UI element. Ideal alternative for Transform Spring Component position spring when using it on UI
  • UiSliderSpringComponent - Adds spring-like animation to a UI slider’s value or fill amount. The springy health bar
  • ColorSpringComponent - Animates a color, on a Renderer or on a UI Graphic
  • LightIntensitySpringComponent - Animates the intensity of a light source using spring behavior
  • CamFovOrSizeSpringComponent - Animates the field of view of a camera, or its orthographic size, with a spring-like motion
  • AudioSourceSpringComponent - Applies spring animation to an AudioSource’s volume and pitch
  • ShaderFloatSpringComponent - Animates float properties in shaders using spring behavior

These four drive nothing on their own. They run a spring and expose its value, and your script decides what to do with it:

  • FloatSpringComponent - A single spring float
  • Vector2SpringComponent, Vector3SpringComponent, Vector4SpringComponent - The same idea, wider

Use them when you want the spring behavior and the Inspector setup, but the value has to end up somewhere the toolkit doesn’t know about.