C# Class TextScene, UnityTextScene

Inheritance: Scene
Mostra file Open project: terravision/UnityTextScene Class Usage Examples

Public Methods

Method Description
AddCurrentSceneToBuild ( ) : void

Adds the currently open scene to the TextScene buildsettings, and updates the standard Unity buildsettings with the corresponding temp binary scene file. User will be notified if the current scene is not saved or is not a temp binary file.

AddSceneToBuild ( string scene ) : bool

Adds a project-relative TextScene to the TextScene buildsettings and the corresponding binary temp file is written to the standard Unity build settings.

AddSelectedSceneToBuild ( ) : void

Adds the selected TextScene file to buildsettings. Also updates the standard Unity buildsettings.

Build ( BuildTarget, buildTarget ) : void

Builds a self-launching player based on the passed BuildTarget parameter. Will go through all scenes in the buildsettings list and make sure they have a temporary binary file to build. Will notify user if anything went wrong (such as empty build settings or unsupported build target).

BuildSettingsDate ( ) : DateTime

Returns the time the build settings file was last written to.

BuildTempScenes ( ) : void
BuildTempScenes ( List scenes ) : void
MoveScenePosition ( string scene, int direction ) : void

Moves a scene up or down in the build settings list.

ReadScenes ( ) : List

Reads in the current list of scenes registered in the custom TextScene buildsettings.

RemoveSceneFromBuild ( string scene ) : void

Removes a project-relative TextScene from the TextScene build-settings. Also updates the standard Unity build settings.

TempToTextSceneFile ( string tempScene ) : string

Takes a project-relatived temp-scene path and converts it to the matching TextScene path.

TextSceneToTempBinaryFile ( string textScene ) : string

Takes a project-relative TextScene filename and converts it to the matching binary temp file.

ValidateBuildSettings ( List &invalidScenes ) : bool

Private Methods

Method Description
SyncBuildSettings ( ) : void

Read and write scenes so unity build settings gets updated.

WriteBuildSettings ( List sceneList ) : void

Writes a list of project-relative TextScene files to buildsettings. The corresponding binary unity scenes are stored in the Unity standard build-settings.

Method Details

AddCurrentSceneToBuild() public static method

Adds the currently open scene to the TextScene buildsettings, and updates the standard Unity buildsettings with the corresponding temp binary scene file. User will be notified if the current scene is not saved or is not a temp binary file.
public static AddCurrentSceneToBuild ( ) : void
return void

AddSceneToBuild() public static method

Adds a project-relative TextScene to the TextScene buildsettings and the corresponding binary temp file is written to the standard Unity build settings.
public static AddSceneToBuild ( string scene ) : bool
scene string
return bool

AddSelectedSceneToBuild() public static method

Adds the selected TextScene file to buildsettings. Also updates the standard Unity buildsettings.
public static AddSelectedSceneToBuild ( ) : void
return void

Build() public static method

Builds a self-launching player based on the passed BuildTarget parameter. Will go through all scenes in the buildsettings list and make sure they have a temporary binary file to build. Will notify user if anything went wrong (such as empty build settings or unsupported build target).
public static Build ( BuildTarget, buildTarget ) : void
buildTarget BuildTarget,
return void

BuildSettingsDate() public static method

Returns the time the build settings file was last written to.
public static BuildSettingsDate ( ) : DateTime
return DateTime

BuildTempScenes() public static method

public static BuildTempScenes ( ) : void
return void

BuildTempScenes() public static method

public static BuildTempScenes ( List scenes ) : void
scenes List
return void

MoveScenePosition() public static method

Moves a scene up or down in the build settings list.
public static MoveScenePosition ( string scene, int direction ) : void
scene string
direction int
return void

ReadScenes() public static method

Reads in the current list of scenes registered in the custom TextScene buildsettings.
public static ReadScenes ( ) : List
return List

RemoveSceneFromBuild() public static method

Removes a project-relative TextScene from the TextScene build-settings. Also updates the standard Unity build settings.
public static RemoveSceneFromBuild ( string scene ) : void
scene string
return void

TempToTextSceneFile() public static method

Takes a project-relatived temp-scene path and converts it to the matching TextScene path.
public static TempToTextSceneFile ( string tempScene ) : string
tempScene string
return string

TextSceneToTempBinaryFile() public static method

Takes a project-relative TextScene filename and converts it to the matching binary temp file.
public static TextSceneToTempBinaryFile ( string textScene ) : string
textScene string
return string

ValidateBuildSettings() public static method

public static ValidateBuildSettings ( List &invalidScenes ) : bool
invalidScenes List
return bool