C# Class FullInspector.BackupService.fiBackupManager

The central API that end-users might be interested in. Provides key functions such as creating a new backup and restoring an old one.
Datei anzeigen Open project: jacobdufault/fullinspector

Public Methods

Method Description
CreateBackup ( Component behavior ) : void

Creates a new backup of the given component. Only guaranteed to work for types that derive from CommonBaseBehavior, but there is a good chance it'll work for most/all types derived from Component.

GetBackupsFor ( CommonBaseBehavior behavior ) : IEnumerable

Returns all backups for the given object.

RestoreBackup ( fiSerializedObject serializedState ) : void

Restores a backup that was previously created.

Private Methods

Method Description
Serialize ( Component target ) : fiSerializedObject

Creates a serialized object from the given component.

ShouldIgnoreForPersist ( FullInspector.Internal.InspectedProperty property ) : bool

Helper function that just ignores a few FI internal types for serialization since the backup solution serializes all inspected properties, not just those that are serialized

Method Details

CreateBackup() public static method

Creates a new backup of the given component. Only guaranteed to work for types that derive from CommonBaseBehavior, but there is a good chance it'll work for most/all types derived from Component.
public static CreateBackup ( Component behavior ) : void
behavior UnityEngine.Component
return void

GetBackupsFor() public static method

Returns all backups for the given object.
public static GetBackupsFor ( CommonBaseBehavior behavior ) : IEnumerable
behavior CommonBaseBehavior
return IEnumerable

RestoreBackup() public static method

Restores a backup that was previously created.
public static RestoreBackup ( fiSerializedObject serializedState ) : void
serializedState fiSerializedObject
return void