C# Class TextSceneMonitor, UnityTextScene

Afficher le fichier Open project: terravision/UnityTextScene Class Usage Examples

Méthodes publiques

Méthode Description
DoSaveAndReload ( string scene, TextSceneDeserializer, callback ) : void
GetCurrentScene ( ) : string

Returns the current scene being monitored.

MonitorUpdate ( ) : void

Wrapper for running an update on the monitor.

SaveIfTempIsNewer ( ) : void
SetCurrentScene ( string filename ) : void

Sets the current TextScene we will monitor for changes. Also stores the current scene Unity has open (the binary version) so we can detect if the user suddenly changes to either a new scene or a different binary scene without going via the TextScene functionality.

TextSceneMonitor ( ) : System

Creates a new TextSceneMonitor and reads in relevant values from PlayerPrefs (such as last monitored scene).

Private Methods

Méthode Description
CheckForChangedTemp ( ) : bool
MonitorStateChange ( ) : void
Update ( ) : void

Regularly checks if something worthy of notifying the user happens. This includes unexpected scene changes (double-clicking .unity files), creating new scenes and source TextScene files having been changed between now and the time it was loaded.

Method Details

DoSaveAndReload() public méthode

public DoSaveAndReload ( string scene, TextSceneDeserializer, callback ) : void
scene string
callback TextSceneDeserializer,
Résultat void

GetCurrentScene() public méthode

Returns the current scene being monitored.
public GetCurrentScene ( ) : string
Résultat string

MonitorUpdate() public static méthode

Wrapper for running an update on the monitor.
public static MonitorUpdate ( ) : void
Résultat void

SaveIfTempIsNewer() public méthode

public SaveIfTempIsNewer ( ) : void
Résultat void

SetCurrentScene() public méthode

Sets the current TextScene we will monitor for changes. Also stores the current scene Unity has open (the binary version) so we can detect if the user suddenly changes to either a new scene or a different binary scene without going via the TextScene functionality.
public SetCurrentScene ( string filename ) : void
filename string /// A holding the full absolute path to the TextScene file. ///
Résultat void

TextSceneMonitor() public méthode

Creates a new TextSceneMonitor and reads in relevant values from PlayerPrefs (such as last monitored scene).
public TextSceneMonitor ( ) : System
Résultat System