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:

The nine components at work: a Transform moving, turning and growing at once; a Rigidbody pressing against a wall it cannot pass and then climbing over it; a UI panel sliding in by its anchored position; a health bar fill; a colour change; a light brightening a wall; a camera zooming in and out; an AudioSource's volume and pitch, read back as bars; and a shader float driving a dissolve
  • TransformSpringComponent - Applies spring animation to a GameObject’s position, rotation, and scale. The usual starting point
  • 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 five 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
  • RotationSpringComponent - A rotation spring, read back as a Quaternion. It does not turn the object it sits on; apply GetCurrentValue() yourself, or use a TransformSpringComponent with only its rotation spring enabled. Spring Bones are built from these

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.