C# Класс TextSceneMonitor, UnityTextScene

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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).

Приватные методы

Метод Описание
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.

Описание методов

DoSaveAndReload() публичный Метод

public DoSaveAndReload ( string scene, TextSceneDeserializer, callback ) : void
scene string
callback TextSceneDeserializer,
Результат void

GetCurrentScene() публичный Метод

Returns the current scene being monitored.
public GetCurrentScene ( ) : string
Результат string

MonitorUpdate() публичный статический Метод

Wrapper for running an update on the monitor.
public static MonitorUpdate ( ) : void
Результат void

SaveIfTempIsNewer() публичный Метод

public SaveIfTempIsNewer ( ) : void
Результат void

SetCurrentScene() публичный Метод

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. ///
Результат void

TextSceneMonitor() публичный Метод

Creates a new TextSceneMonitor and reads in relevant values from PlayerPrefs (such as last monitored scene).
public TextSceneMonitor ( ) : System
Результат System