private void OnCaptureState() { Dictionary <string, object> data = new Dictionary <string, object>(); foreach (ISavable saveable in GetComponents <ISavable>()) { data[saveable.GetType().ToString()] = saveable.CaptureState(); } SaveManager.CaptureState(uniqueIdentifier, data); }