Bro Code logoBRO CODE CRINDEPENDENT GAME DEV TOOLS
← All abilities
ABILITY 01

TransformSize

Grow or shrink your character and restore its original scale when the ability stops.

Activation

TransformSizeButton

Example use

Explore the setup guide below to configure this ability.

Ability documentation
CHARACTER ABILITY
SETUP GUIDE

Set up this ability

Component
CharacterTransformSize
Source
Scripts/Abilities/CharacterTransformSize.cs
Animator bools
TransformSize
  1. Add CharacterTransformSize to a CharacterPlus character with the shared input setup.
  2. Set SizeTransform to 2 for double scale or -2 for half scale. The implementation uses the reciprocal of the absolute value for negative numbers.
  3. For a timed example, set ActiveTime to 3. Otherwise 0 leaves it active until stopped. Press the assigned input to activate; press again to restore scale when StopOnButtonPressed is enabled.

Inspector reference

These are C# field declaration defaults. Existing prefab and scene values can override them. Shared fields are documented under Ability Configuration.

CharacterTransformSize fields
FieldTypeDeclared default
SizeTransformfloat2f

Usage notes

  • Original scale is captured during initialization and restored when the ability stops.