C# Class TextSceneMonitor, UnityTextScene

Mostrar archivo Open project: terravision/UnityTextScene Class Usage Examples

Public Methods

Method 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

Method 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 method

public DoSaveAndReload ( string scene, TextSceneDeserializer, callback ) : void
scene string
callback TextSceneDeserializer,
return void

GetCurrentScene() public method

Returns the current scene being monitored.
public GetCurrentScene ( ) : string
return string

MonitorUpdate() public static method

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

SaveIfTempIsNewer() public method

public SaveIfTempIsNewer ( ) : void
return void

SetCurrentScene() public method

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. ///
return void

TextSceneMonitor() public method

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