Transform Auto-Save

Tracking position, rotation, and scale variables manually for numerous active objects (e.g., platforms, collectibles, traps) can clog up your gameplay scripts. Save System Pro resolves this with AutoSaveTransform — an automated, drag-and-drop runtime script.


🤖 What does it track?

When attached to a GameObject, AutoSaveTransform hooks into the active save state. It automatically tracks:

  • GameObject Position (Vector3)
  • GameObject Rotation (Quaternion)
  • GameObject Scale (Vector3)

⚙️ Drag-and-Drop Setup

To automate any object’s transform state:

  1. Select the target GameObject in your Unity hierarchy.
  2. Ensure it has an AutoSaveIdentifier component attached (refer to the Auto-Save Manager page for details on GUID generation).
  3. Click Add Component in the Inspector.
  4. Search for and select AutoSaveTransform.
  5. Customize tracking choices using the toggles in the Inspector.

🛠️ Custom Inspector Parameters

In the Unity Inspector panel for AutoSaveTransform, you can configure specific settings to match your gameplay physics:

Setting Type Description
Save Position bool Toggles tracking of the object’s spatial coordinates.
Save Rotation bool Toggles tracking of the object’s angular rotation.
Save Scale bool Toggles tracking of the object’s absolute scale dimensions.
Use Local Space bool If toggled On, saves values relative to the object’s parent in the hierarchy (transform.localPosition). If toggled Off, saves absolute world coordinates (transform.position). Very useful for nested items on moving trains or moving platforms!

🚀 Deep Technical Details

The AutoSaveTransform script is highly optimized to prevent garbage allocation (GC) and frame spikes during runtime transitions:

  1. Identifier Binding: On scene load, it maps its serializable coordinates under a unique key calculated as [GUID]_transform (where GUID is the unique key generated by the object’s AutoSaveIdentifier script).
  2. Zero-Stutter Snapshotting: Instead of constantly query-caching values every frame, it reads coordinates and writes updates directly during central save-triggers managed by the global AutoSaveManager, keeping your frame times clean and uncompromised.

This site uses Just the Docs, a documentation theme for Jekyll.