FAST SDK Coding Reference 1.0.3
Loading...
Searching...
No Matches
Application Class Reference

Access a FAST application's runtime data. More...

Inheritance diagram for Application:
Singleton< T >

Public Types

enum  ChangeLanguageMode
 Indicates whether to change to the next or previous language. More...
 

Static Public Member Functions

static void ChangeLanguage (ChangeLanguageMode mode)
 Changes the current language and all FAST.AssetFromFile assets.
 
static void ChangeLanguageByIndex (int index)
 Changes the current language and all FAST.AssetFromFile assets.
 
static void ChangeLanguageByName (string name)
 Changes the current language and all FAST.AssetFromFile assets.
 
static void CopyPreviousLog ()
 Makes a copy of the previous log file with a timestamp and saves it to the FAST.Application.logsDirectory.
 
static void InitializeLanguage ()
 Intializes the current language and all FAST.AssetFromFile assets.
 
static void Quit ()
 Quits the Unity Player or Editor.
 
static bool ReadSettings ()
 Reads the activity settings from file.
 
static void ToggleCursor ()
 Toggles the mouse cursor on/off.
 
static void ToggleFullscreen ()
 Toggles the application between fullscreen and windowed.
 
static bool WriteSettings ()
 Writes the activity settings to file.
 

Static Public Attributes

static string activityDirectory = ""
 Returns the path to the root folder where this activity is installed.
 
static string applicationDirectory = ""
 Returns the path to the Application folder where this activity is installed.
 
static Dictionary< string, Dictionary< string, System.Object > > assets = new()
 The dictionary of assets from file.
 
static string assetsDirectory = ""
 Returns the path to the Assets folder where this activity is installed.
 
static string language = ""
 The current language.
 
static int languageIndex
 The index of the current language within the FAST.Application.languages array.
 
static string[] languages = { }
 The available languages for the activity.
 
static string logsDirectory = ""
 Returns the path to the Logs folder where this activity is installed.
 
static SerialConnection[] serialConnections = { }
 An array of all FAST.SerialConnections loaded at startup.
 
static dynamic settings
 The activity settings.
 
static string settingsPath = ""
 Returns the path to the activity settings files where this activity is installed.
 
static string skin = ""
 The current skin for the activity.
 
static UdpConnection[] udpConnections = { }
 An array of all FAST.UdpConnections loaded at startup.
 
static WebRequest[] webRequests = { }
 An array of all FAST.WebRequests loaded at startup.
 

Protected Member Functions

override void Awake ()
 Sets FAST.Singleton<T>._instance and destorys any additional instances.
 
- Protected Member Functions inherited from Singleton< T >
virtual void OnDestroy ()
 Sets FAST.Singleton<T>._instance to null when the last instance is destroyed.
 

Private Attributes

bool hideCursor = true
 Inspector
Set to true if the cursor should be hidden on startup.
 

Additional Inherited Members

- Public Attributes inherited from Singleton< T >
bool dontDestroyOnLoad = false
 Inspector
Set to true if this GameObject should not be destroyed when loading a new scene.
 
- Static Protected Attributes inherited from Singleton< T >
static T _instance
 Reference to the singleton instance.
 

Detailed Description

Access a FAST application's runtime data.

This class contains static methods for looking up information about and controlling the runtime data. It is included in the Startup Prefab.

Member Enumeration Documentation

◆ ChangeLanguageMode

Indicates whether to change to the next or previous language.

Member Function Documentation

◆ Awake()

override void Awake ( )
protectedvirtual

Sets FAST.Singleton<T>._instance and destorys any additional instances.

Reimplemented from Singleton< T >.

◆ ChangeLanguage()

static void ChangeLanguage ( ChangeLanguageMode mode)
static

Changes the current language and all FAST.AssetFromFile assets.

Parameters
modeEither the next or previous language in the FAST.Application.languages array.

◆ ChangeLanguageByIndex()

static void ChangeLanguageByIndex ( int index)
static

Changes the current language and all FAST.AssetFromFile assets.

Parameters
indexThe index of the language to use in the FAST.Application.languages array.

◆ ChangeLanguageByName()

static void ChangeLanguageByName ( string name)
static

Changes the current language and all FAST.AssetFromFile assets.

Parameters
nameThe name of the language to use in the FAST.Application.languages array.

◆ CopyPreviousLog()

static void CopyPreviousLog ( )
static

Makes a copy of the previous log file with a timestamp and saves it to the FAST.Application.logsDirectory.

This is called by the FAST.StartupManager during startup after all loaders have completed.

◆ InitializeLanguage()

static void InitializeLanguage ( )
static

Intializes the current language and all FAST.AssetFromFile assets.

This is called by the FAST.StartupManager during startup after the activity scene has been loaded.

◆ Quit()

static void Quit ( )
static

Quits the Unity Player or Editor.

◆ ReadSettings()

static bool ReadSettings ( )
static

Reads the activity settings from file.

This is called by the FAST.SettingsLoader during startup to initialize the avtibity settings.

Returns
true if the read succeeded, false if it failed.

◆ ToggleCursor()

static void ToggleCursor ( )
static

Toggles the mouse cursor on/off.

◆ ToggleFullscreen()

static void ToggleFullscreen ( )
static

Toggles the application between fullscreen and windowed.

◆ WriteSettings()

static bool WriteSettings ( )
static

Writes the activity settings to file.

This is called by the FAST.StartupManager during startup after all loaders have completed sync changes to the activity settings attributes. It is also called by FAST.SettingsLoader when the activity settings file is not found.

Returns
true if the write succeeded, false if it failed.

Member Data Documentation

◆ activityDirectory

string activityDirectory = ""
static

Returns the path to the root folder where this activity is installed.

This path is set by the FAST.InstallationLoader during startup.

◆ applicationDirectory

string applicationDirectory = ""
static

Returns the path to the Application folder where this activity is installed.

This path is set by the FAST.InstallationLoader during startup.

◆ assets

Dictionary<string, Dictionary<string, System.Object> > assets = new()
static

The dictionary of assets from file.

This is initialized by FAST.AssetsLoader and used in every class that derives from FAST.AssetFromFile.

◆ assetsDirectory

string assetsDirectory = ""
static

Returns the path to the Assets folder where this activity is installed.

This path is set by the FAST.InstallationLoader during startup.

◆ hideCursor

bool hideCursor = true
private

Inspector
Set to true if the cursor should be hidden on startup.

◆ language

string language = ""
static

The current language.

This is initialized in FAST.Application.InitializeLanguage() during startup after all loaders have completed.

◆ languageIndex

int languageIndex
static

The index of the current language within the FAST.Application.languages array.

This is initialized in FAST.Application.InitializeLanguage() during startup after all loaders have completed.

◆ languages

string [] languages = { }
static

The available languages for the activity.

This is initialized by the FAST.AssetsLoader during startup.

◆ logsDirectory

string logsDirectory = ""
static

Returns the path to the Logs folder where this activity is installed.

This path is set by the FAST.InstallationLoader during startup.

◆ serialConnections

SerialConnection [] serialConnections = { }
static

An array of all FAST.SerialConnections loaded at startup.

This is initialized by the FAST.StartupManager during startup after all loaders have completed.

◆ settings

dynamic settings
static

The activity settings.

This is initialized by the FAST.SettingsLoader during startup.

◆ settingsPath

string settingsPath = ""
static

Returns the path to the activity settings files where this activity is installed.

This path is set by the FAST.SettingsLoader during startup.

◆ skin

string skin = ""
static

The current skin for the activity.

This is initialized by the FAST.AssetsLoader during startup.

◆ udpConnections

UdpConnection [] udpConnections = { }
static

An array of all FAST.UdpConnections loaded at startup.

This is initialized by the FAST.StartupManager during startup after all loaders have completed.

◆ webRequests

WebRequest [] webRequests = { }
static

An array of all FAST.WebRequests loaded at startup.

This is initialized by the FAST.StartupManager during startup after all loaders have completed.


The documentation for this class was generated from the following file: