Adventure Creator  1.66.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2018
AC.SceneSettings Class Reference
Inheritance diagram for AC.SceneSettings:

Public Member Functions

void OnAwake ()
 
void OnStart ()
 
void UpdateAllSortingMaps ()
 
PlayerStart GetPlayerStart ()
 Gets the appropriate PlayerStart to use when the scene begins. More...
 
void OnLoad ()
 
void PlayDefaultSound (AudioClip audioClip, bool doLoop)
 Plays an AudioClip on the default Sound prefab. More...
 
void PauseGame ()
 
void UnpauseGame (float newScale)
 
float GetVerticalReductionFactor ()
 Gets how much slower vertical movement is compared to horizontal movement, if the game is in 2D. More...
 
void OnStateChange ()
 
InvVar GetAttribute (int ID)
 Gets a scene attribute. More...
 
bool OverridesCameraPerspective ()
 
void SetOverrideCameraPerspective (CameraPerspective _cameraPerspective, MovingTurning _movingTurning)
 
void ShowCameraOverrideLabel ()
 

Static Public Member Functions

static bool ActInScreenSpace ()
 Checks if the scene is in 2D, and plays in screen-space (i.e. characters do not move towards or away from the camera). More...
 
static bool IsUnity2D ()
 Checks if the scene uses Unity 2D for its camera perspective. More...
 
static bool IsTopDown ()
 Checks if the scene uses Top Down for its camera perspective. More...
 

Public Attributes

ActionListSource actionListSource = ActionListSource.InScene
 
Cutscene cutsceneOnStart
 
Cutscene cutsceneOnLoad
 
Cutscene cutsceneOnVarChange
 
ActionListAsset actionListAssetOnStart
 
ActionListAsset actionListAssetOnLoad
 
ActionListAsset actionListAssetOnVarChange
 
PlayerStart defaultPlayerStart
 
AC_NavigationMethod navigationMethod = AC_NavigationMethod.meshCollider
 
string customNavigationClass
 
NavigationMesh navMesh
 
SortingMap sortingMap
 
Sound defaultSound
 
TintMap tintMap
 
List< InvVarattributes = new List<InvVar>()
 
ManagerPackage requiredManagerPackage
 
bool overrideVerticalReductionFactor = false
 
float verticalReductionFactor = 0.7f
 
float sharedLayerSeparationDistance = 0.001f
 
CameraPerspective cameraPerspective
 

Properties

static CameraPerspective CameraPerspective [get]
 

Detailed Description

This component is where settings specific to a scene are stored, such as the navigation method, and the Cutscene to play when the scene begins. The SceneManager provides a UI to assign these fields. This component should be placed on the GameEngine prefab.

Member Function Documentation

◆ ActInScreenSpace()

static bool AC.SceneSettings.ActInScreenSpace ( )
static

Checks if the scene is in 2D, and plays in screen-space (i.e. characters do not move towards or away from the camera).

Returns
True if the game is in 2D, and plays in screen-space

◆ GetAttribute()

InvVar AC.SceneSettings.GetAttribute ( int  ID)

Gets a scene attribute.

Parameters
IDThe ID number of the attribute to get
Returns
The attribute of the scene

◆ GetPlayerStart()

PlayerStart AC.SceneSettings.GetPlayerStart ( )

Gets the appropriate PlayerStart to use when the scene begins.

Returns
The appropriate PlayerStart to use when the scene begins

◆ GetVerticalReductionFactor()

float AC.SceneSettings.GetVerticalReductionFactor ( )

Gets how much slower vertical movement is compared to horizontal movement, if the game is in 2D.

Returns
Gets how much slower vertical movement is compared to horizontal movement

◆ IsTopDown()

static bool AC.SceneSettings.IsTopDown ( )
static

Checks if the scene uses Top Down for its camera perspective.

Returns
True if the game uses Top Down for its camera perspective

◆ IsUnity2D()

static bool AC.SceneSettings.IsUnity2D ( )
static

Checks if the scene uses Unity 2D for its camera perspective.

Returns
True if the game uses Unity 2D for its camera perspective

◆ OnLoad()

void AC.SceneSettings.OnLoad ( )

Runs the "cutsceneOnLoad" Cutscene.

◆ PauseGame()

void AC.SceneSettings.PauseGame ( )

Pauses the game by freezing time and sounds.

◆ PlayDefaultSound()

void AC.SceneSettings.PlayDefaultSound ( AudioClip  audioClip,
bool  doLoop 
)

Plays an AudioClip on the default Sound prefab.

Parameters
audioClipThe AudioClip to play
doLoopIf True, the sound will loop

◆ UnpauseGame()

void AC.SceneSettings.UnpauseGame ( float  newScale)

Unpauses the game by unfreezing time.

◆ UpdateAllSortingMaps()

void AC.SceneSettings.UpdateAllSortingMaps ( )

Links all SortingMaps with their associated FollowSortingMaps.

Member Data Documentation

◆ actionListAssetOnLoad

ActionListAsset AC.SceneSettings.actionListAssetOnLoad

The ActionListAsset to run whenever this scene is loaded after restoring a saved game file, if actionListSource = ActionListSource.AssetFile

◆ actionListAssetOnStart

ActionListAsset AC.SceneSettings.actionListAssetOnStart

The ActionListAsset to run whenever the game beings from this scene, or when this scene is visited during gameplay, if actionListSource = ActionListSource.AssetFile

◆ actionListAssetOnVarChange

ActionListAsset AC.SceneSettings.actionListAssetOnVarChange

The ActionListAsset to run whenever a variable's value is changed, if actionListSource = ActionListSource.AssetFile

◆ actionListSource

ActionListSource AC.SceneSettings.actionListSource = ActionListSource.InScene

The source of Actions used for the scene's main cutscenes (InScene, AssetFile)

◆ attributes

List<InvVar> AC.SceneSettings.attributes = new List<InvVar>()

The scene's attributes

◆ customNavigationClass

string AC.SceneSettings.customNavigationClass

The class name of the NavigationEngine ScriptableObject that is used to handle pathfinding, if navigationMethod = AC_NavigationMethod.Custom

◆ cutsceneOnLoad

Cutscene AC.SceneSettings.cutsceneOnLoad

The Cutscene to run whenever this scene is loaded after restoring a saved game file, if actionListSource = ActionListSource.InScene

◆ cutsceneOnStart

Cutscene AC.SceneSettings.cutsceneOnStart

The Cutscene to run whenever the game beings from this scene, or when this scene is visited during gameplay, if actionListSource = ActionListSource.InScene

◆ cutsceneOnVarChange

Cutscene AC.SceneSettings.cutsceneOnVarChange

The Cutscene to run whenever a variable's value is changed, if actionListSource = ActionListSource.InScene

◆ defaultPlayerStart

PlayerStart AC.SceneSettings.defaultPlayerStart

The scene's default PlayerStart prefab

◆ defaultSound

Sound AC.SceneSettings.defaultSound

The scene's default Sound prefab

◆ navigationMethod

AC_NavigationMethod AC.SceneSettings.navigationMethod = AC_NavigationMethod.meshCollider

The scene's navigation method (meshCollider, UnityNavigation, PolygonCollider)

◆ navMesh

NavigationMesh AC.SceneSettings.navMesh

The scene's active NavigationMesh, if navigationMethod != AC_NavigationMethod.UnityNavigation

◆ overrideVerticalReductionFactor

bool AC.SceneSettings.overrideVerticalReductionFactor = false

If True, then the global verticalReductionFactor in SettingsManager will be overridden with a scene-specific value

◆ requiredManagerPackage

ManagerPackage AC.SceneSettings.requiredManagerPackage

If this is assigned, and the currently-loaded Manager assets do not match those defined within, then a Warning message will appear in the Console

◆ sharedLayerSeparationDistance

float AC.SceneSettings.sharedLayerSeparationDistance = 0.001f

The distance to offset a character by when it is in the same area of a SortingMap as another (to correct display order)

◆ sortingMap

SortingMap AC.SceneSettings.sortingMap

The scene's default SortingMap prefab

◆ tintMap

TintMap AC.SceneSettings.tintMap

The scene's default LightMap prefab

◆ verticalReductionFactor

float AC.SceneSettings.verticalReductionFactor = 0.7f

How much slower vertical movement is compared to horizontal movement, if the game is in 2D and overriderVerticalReductionFactor = True

Property Documentation

◆ CameraPerspective

CameraPerspective AC.SceneSettings.CameraPerspective
staticget

The camera perspective of the current scene.