Adventure Creator  1.66.8
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.SceneInfo Class Reference

Public Member Functions

 SceneInfo ()
 
 SceneInfo (string _name, int _number)
 The default Constructor. More...
 
 SceneInfo (string _name)
 A Constructor where only the scene's name is defined. More...
 
 SceneInfo (int _number)
 A Constructor where only the scene's number is defined. More...
 
 SceneInfo (ChooseSceneBy chooseSceneBy, string _name, int _number)
 A Constructor. More...
 
bool IsValid ()
 
bool Matches (SceneInfo _sceneInfo)
 Checks if the variables in this instance of the class match another instance. More...
 
string GetLabel ()
 
void LoadLevel (bool forceReload=false)
 Loads the scene normally. More...
 
void AddLevel ()
 Adds the scene additively.
 
bool CloseLevel ()
 Closes the scene additively. More...
 
AsyncOperation LoadLevelASync ()
 Loads the scene asynchronously. More...
 

Public Attributes

string name
 
int number
 

Properties

bool IsNull [get]
 

Detailed Description

A container for information about a scene that can be loaded.

Constructor & Destructor Documentation

◆ SceneInfo() [1/5]

AC.SceneInfo.SceneInfo ( )

A Constructor for the current active scene.

◆ SceneInfo() [2/5]

AC.SceneInfo.SceneInfo ( string  _name,
int  _number 
)

The default Constructor.

Parameters
_nameThe scene's name
_numberThe scene's number. If name is left empty, this number will be used to reference the scene instead

◆ SceneInfo() [3/5]

AC.SceneInfo.SceneInfo ( string  _name)

A Constructor where only the scene's name is defined.

Parameters
_nameThe scene's name

◆ SceneInfo() [4/5]

AC.SceneInfo.SceneInfo ( int  _number)

A Constructor where only the scene's number is defined.

Parameters
_nameThe scene's build index number

◆ SceneInfo() [5/5]

AC.SceneInfo.SceneInfo ( ChooseSceneBy  chooseSceneBy,
string  _name,
int  _number 
)

A Constructor.

Parameters
chooseSeneByThe method by which the scene is referenced (Name, Number)
_nameThe scene's name
_numberThe scene's number. If name is left empty, this number will be used to reference the scene instead

Member Function Documentation

◆ CloseLevel()

bool AC.SceneInfo.CloseLevel ( )

Closes the scene additively.

Returns
True if the operation was successful

◆ LoadLevel()

void AC.SceneInfo.LoadLevel ( bool  forceReload = false)

Loads the scene normally.

Parameters
forceReloadIf True, the scene will be re-loaded if it is already open.

◆ LoadLevelASync()

AsyncOperation AC.SceneInfo.LoadLevelASync ( )

Loads the scene asynchronously.

Returns
The generated AsyncOperation class

◆ Matches()

bool AC.SceneInfo.Matches ( SceneInfo  _sceneInfo)

Checks if the variables in this instance of the class match another instance.

Parameters
_sceneInfoThe other SceneInfo instance to compare
Returns
True if the variables in this instance of the class matches the other instance

Member Data Documentation

◆ name

string AC.SceneInfo.name

The scene's name

◆ number

int AC.SceneInfo.number

The scene's number. If name is left empty, this number will be used to reference the scene instead

Property Documentation

◆ IsNull

bool AC.SceneInfo.IsNull
get

Returns True if the scene data is empty