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

Public Member Functions

void OnInitGameEngine ()
 
void OnStart ()
 
void AssignPlayerStart ()
 Finds the appropriate PlayerStart to refer to, based on the last scene's conditions, and sets the Player there More...
 
void SetSortingMap (SortingMap _sortingMap)
 
void SetTintMap (TintMap _tintMap)
 
PlayerStart GetPlayerStart (int playerID)
 Gets the appropriate PlayerStart to use when the scene begins. More...
 
void OnLoad ()
 
void PlayDefaultSound (AudioClip audioClip, bool doLoop, bool avoidRestarting=false)
 Plays an AudioClip on the default Sound prefab. More...
 
float GetVerticalReductionFactor ()
 Gets how much slower vertical movement is compared to horizontal movement, if the game is in 2D. More...
 
bool OverridesCameraPerspective ()
 
InvVar GetAttribute (int ID)
 Gets a scene attribute. More...
 
void SetOverrideCameraPerspective (CameraPerspective _cameraPerspective, MovingTurning _movingTurning)
 
void ShowCameraOverrideLabel ()
 
bool ReferencesAsset (ActionListAsset actionListAsset)
 
List< ActionListAssetGetReferencedActionListAssets ()
 

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.UnityNavigation
 
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
 
bool visibilityHotspots = true
 
bool visibilityTriggers = true
 
bool visibilityCollision = true
 
bool visibilityMarkers = true
 
bool visibilityPlayerStarts = true
 
bool visibilityNavMesh = true
 

Protected Member Functions

void PlayStartCutscene ()
 

Protected Attributes

bool overrideCameraPerspective = false
 
MovingTurning movingTurning = MovingTurning.Unity2D
 
AudioSource defaultAudioSource
 
string[] cameraPerspective_list = { "2D", "2.5D", "3D" }
 

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

◆ AssignPlayerStart()

void AC.SceneSettings.AssignPlayerStart ( )

Finds the appropriate PlayerStart to refer to, based on the last scene's conditions, and sets the Player there

Parameters
onlySetCameraIf True, then the Player will not be moved - and only the camera will be switched to, if one was assigned

◆ 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 ( int  playerID)

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.

◆ PlayDefaultSound()

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

Plays an AudioClip on the default Sound prefab.

Parameters
audioClipThe AudioClip to play
doLoopIf True, the sound will loop
avoidRestartingIf True, then the sound will not play if the same clip is already playing

◆ SetSortingMap()

void AC.SceneSettings.SetSortingMap ( SortingMap  _sortingMap)

Assigns a new SortingMap

◆ SetTintMap()

void AC.SceneSettings.SetTintMap ( TintMap  _tintMap)

Assigns a new TintMap

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.UnityNavigation

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.