Unity Asset Store

Unit Conversion Toolkit for Unity Developers

RealisticPhysics UnitConverter provides clean runtime APIs, 97 conversion families, 1,632 supported units, and optional Unity Inspector integration for practical production workflows.

  • 97 conversion families
  • 1,632 supported units
  • 40,000+ compatible conversion paths
  • Static APIs, extension methods, and direct unit-specific methods
  • Optional Unity Inspector overrides
  • Settings asset workflow
  • Runtime/editor separation
  • Documentation and demo scene included
97 conversion families
1,632 supported units
40,000+ compatible conversion paths

Built for Unity Developers

RealisticPhysics UnitConverter is built around practical Unity development. Use it for quick one-off conversions, structured runtime systems, custom editor tools, simulation values, imported data, gameplay balancing, or any workflow where values need to move between different unit systems without messy helper code.

What UnitConverter does

A structured Unity conversion framework with organized APIs, clear namespaces, reusable conversion families, editor integration, settings-based configuration, and documentation for extending the system with new units or families.

Who it is for

Unity developers, technical artists, simulation developers, physics and gameplay programmers, tool developers, and teams that need clean, reliable unit conversion workflows inside Unity projects.

Large Conversion Library

The package includes a broad conversion library covering common Unity, scientific, engineering, electrical, digital, physical, and utility workflows. Each family has its own unit enum and converter class, keeping conversions organized and helping prevent invalid cross-family mistakes.

  • Physical units
  • Electrical units
  • Digital units
  • Motion units
  • Pressure units
  • Energy units
  • Temperature units
  • Fluid units
  • Radiation units
  • Lighting units
  • Utility & development units

Three Developer-Friendly API Styles

Choose the style that fits your codebase — explicit converters, fluent extensions, or direct unit methods.

Static Converter API

Use family-based converter classes when you want explicit, readable conversion calls.

using RealisticPhysics.UnitConversion.Length;

double centimeters = UnitConverterLength.Convert(
    1.5,
    UnitConverterLengthUnit.Meter,
    UnitConverterLengthUnit.Centimeter);

Extension Method API

Readable numeric workflows. Supports double, float, decimal, and common integral types.

using RealisticPhysics.UnitConversion.Length;

double value = 1.5;
double centimeters = value.Convert(
    UnitConverterLengthUnit.Meter,
    UnitConverterLengthUnit.Centimeter);

Direct Unit-Specific Methods

Highly explicit method names with namespace-based auto-complete.

using RealisticPhysics.UnitConversion.Length.Metric;

double centimeters =
    UnitConverterMetricLength.MeterToCentimeter(1.5);

Clean Runtime Architecture

Each conversion family follows a canonical base-unit conversion pattern. Values convert into the family base unit and then out to the requested unit. This keeps behavior consistent across API styles and makes the system easier to understand, maintain, test, and extend.

Incompatible conversions are prevented by separate enums and converter classes — length uses length units, power uses power units, mass uses mass units, and so on.

Optional Unity Inspector Integration

UnitConverter includes optional Unity editor inspector overrides. Unity continues to store native values normally, while UnitConverter displays and edits converted values in the Inspector.

Transform enabled by default

Stored in Unity (native)

Position Y2.5 m
Position X0 m
Position Z0 m

Inspector display

Position Y250 cm
Position X0 cm
Position Z0 cm

Edit Position Y to 100 cm → Unity stores 1.0 m. Preferred position unit is set in UnitConverter settings.

Settings Asset Workflow

Inspector overrides and display preferences are controlled through a dedicated UnitConverter settings asset.

Asset path

Assets/RealisticPhysics/UnitConverter/Settings/UnitConverterSettings.asset

Unity menu

Tools > RealisticPhysics > UnitConverter > Open Settings

Configurable options

  • Enable Unity inspector overrides
  • Per-component override toggles (Transform, Rigidbody, colliders, Camera, Light, AudioSource)
  • Preferred display units for Transform position, collider lengths, Rigidbody mass, camera clip planes, light range, and audio distance

Organized Namespaces

UnitConverter uses organized namespaces by conversion family and unit system. Import only the families or direct unit systems you need. US and UK Imperial volume units are separated because some unit names are shared but values differ.

RealisticPhysics.UnitConversion.Length
RealisticPhysics.UnitConversion.Length.Metric
RealisticPhysics.UnitConversion.Length.Imperial
RealisticPhysics.UnitConversion.Length.Survey
RealisticPhysics.UnitConversion.Length.Nautical
RealisticPhysics.UnitConversion.Volume.ImperialUS
RealisticPhysics.UnitConversion.Volume.ImperialUK
RealisticPhysics.UnitConversion.Mass.Troy

Feature Highlights

  • 97 conversion families
  • 1,632 supported units
  • 40,000+ compatible conversion paths
  • Static converter API
  • Extension methods for double, float, decimal, and common integral numeric types
  • Direct unit-specific conversion methods
  • Canonical base-unit conversion pattern
  • Organized namespaces by unit family and unit system
  • Metric, Imperial, Imperial UK, Imperial US, engineering, scientific, nautical, survey, historical, digital, and common unit groups
  • Runtime conversion API usable without Unity scenes or components
  • Optional Unity inspector overrides
  • Supported inspector integrations: Transform, Rigidbody, BoxCollider, SphereCollider, CapsuleCollider, CharacterController, Camera, Light, and AudioSource
  • Settings asset for configuring editor integrations and display preferences
  • Runtime/editor separation
  • Assembly definition files included
  • Runtime demo scene included
  • Documentation included
  • Designed for clean integration into existing Unity projects

Documentation and Demo

UnitConverter includes documentation for getting started, API usage, inspector integrations, settings, troubleshooting, and extending the system with new units or unit families.

Getting Started Settings Inspector Overrides Static Converter API Extension Method API Direct Methods and Namespaces Supported Families and Units Length Examples Electrical Examples Unity Inspector Examples Runtime Demo Adding a New Unit Adding a New Unit Family Troubleshooting

Read Documentation

Simple for quick conversions. Structured for clean code.

Flexible for deeper Unity editor integration. RealisticPhysics UnitConverter is a practical Unity toolkit for developers who need clean, reliable unit conversions in runtime code and optional editor workflows.