It's that time again! This update focuses on performance, fixes, and fine-tuning. It does, however, make some key changes under the hood - so reading the Upgrade notes section of the changelog is especially important. Please read first and back-up your projects before upgrading!
Upgrade notes
- If a SavesList element does not automatically handle the loading or saving, its Menu is no longer closed when clicked on
- If a SavesList element has "Fixed option number" checked, the "ActionList on click/save/load" now passes the chosen option as a parameter, not the slot index
- The "Options.SwitchProfile" and "Options.SwitchProfileIfExists" functions have been renamed to "Options.SwitchProfileID" and "Options.SwitchProfile" respectively
- For in-game changes to Journals to be saved, pages must now be listed in the Speech Manager by using the "Gather text" feature
- The Cursor's locked state is now recorded in save games
- The PlayerInput script's cursorIsLocked variable is now private, use IsCursorLocked() instead
- The Dialog script's GetDefaultAudioSource has been replaced with GetNarratorAudioSource
Performance
- Added: "Performance and optimisation" section to Manual
- Added: Performance boost to Sorting Maps, Menu system and Speech Manager
- Added: Ability to reduce Resources.LoadAll() calls when loading a saved game by placing assets in "Saveable" subfolders - see Manual's Section 13.6
- Added: AC's OnGUI code will now be ignored, and given a performance boost, if "ACIgnoreOnGUI" is listed as a Scripting Define Symbol
Saving
- Added: Ability for the "Save: Check" Action to check for saves by SavesList element slot index as well as save ID
- Changed: If a SavesList element does not automatically handle the loading or saving, its Menu is no longer closed when clicked on
- Changed: If a SavesList element has "Fixed option number" checked, the "ActionList on click/save/load" now passes the chosen option as a parameter, not the slot index
- Fixed: SavesList element's "ActionList on click/save/load" not accounting for the element's offset when passing the slot index value as a parameter
- Fixed: Player's first-person camera being made active upon loading a save game, even if the Movement method is not set to First Person
Comments
- Added: The "Save: Manage profiles" Action can now be used to switch the active profile manually
- Added: The "Options.CreateProfile" function now returns the created profile ID number
- Added: The "Save: Manage profiles" Action can now refer to profiles by ID number, as well as by slot index
- Added: Ability to prevent clicking of ProfilesList menu elements resulting in the active profile being automatically switched
- Added: Ability to send the profile index to an ActionList asset's integer parameter when clicking a ProfilesList menu element
- Added: Ability to have the ProfilesList menu element refer to a fixed profile ID only
- Added: The "Save: Check" Action can now check if a given profile exists
- Changed:
SpeechThe "Options.SwitchProfile" and "Options.SwitchProfileIfExists"
functions have been renamed to "Options.SwitchProfileID" and
"Options.SwitchProfile" respectively
- Added: "Dialogue: Rename option" Action - use to rename a Conversation's dialogue option labels
- Changed: The Dialog script's GetDefaultAudioSource has been replaced with GetNarratorAudioSource
- Fixed: "Reset text" button in Speech Manager ignoring certain Actions
- Fixed: Audio not stopping if a narration line is stopped using the "Dialogue: Stop speech" Action
- Fixed: Narration speech audio levels being affected by SFX reduction settings
- Fixed: Speed issues with speech-scrolling when Unity's Fixed Timestep setting is changed
Journals- Added: Ability to insert and move pages within a Journal element in the Menu Manager
- Added: The currently-viewed page in a journal will now be recorded in save game files
- Changed:
- Fixed: Display issue with Menu Manager if viewing a Journal element with too much text
- Fixed: Issues with journals that include colon characters in their page text
MenusFor in-game changes to Journals to be saved, pages must now be listed
in the Speech Manager by using the "Gather text" feature
- Added: Ability to simulate right-clicks on Unity UI elements by pressing the "InteractionB" input
- Added: Option to reset Menus when using the "Engine: End game" Action to restart the game
- Added: Ability to control the opening and closing of Interaction Menus via script only
- Fixed: Issue when replacing inventory items while "Items can be re-ordered in Menu" is enabled
Cursor- Added: Ability to sync system cursor's lock state with AC's cursor lock state (enabled by default)
- Changed: The PlayerInput script's cursorIsLocked variable is now private, use IsCursorLocked() instead
- Changed: The Cursor's locked state is now recorded in save games
- Fixed: Various issues related to free-aim locking when using Keyboard And Controller input
- Fixed: Game Camera Third Person no longer being draggable when the cursor is locked
Variables- Added: Parameter values can now be set from Global Variables with the "ActionList: Set parameter" Action
- Added: Ability to create new Integer variables directly from the "Variable: Run sequence" Action
Sound- Added: Ability to play sounds from Footstep Sounds component automatically as opposed to relying on Animation Events
- Added: Ability to define "run" sounds in Footstep Sounds component
- Added: Static "music" variable to KickStarter script
Draggables- Added: Notice on Draggables that rely on Straight Tracks to recommend the use of a Sphere Collider to set their boundary limits
- Added: Ability to control the influence of the player's movement on the drag force when moving Draggables
- Fixed: Issue when dragging objects with an UFPS player prefab
- Fixed: Collide sounds not playing on Draggable objects
- Fixed: Speed issues with draggables when Unity's Fixed Timestep setting is changed
Player- Added: Changes to Players made using "Character: Animate" are now saved when switching to and from scenes with local Players
- Added:
- Fixed: “Jump speed” field not showing in Settings Manager when using Touch Screen input
- Fixed: Wrong scene sometimes loading if Players present in the scene file are used in conjunction with Player prefabs
- Fixed: Switching Player sometimes causing the Player to become hidden if Loading Screens are enabled
- Fixed: First Person Camera moving slightly when unpausing the game when running fullscreen
- Fixed: Hotspots sometimes not highlighting when using Player Vicinity to detect them
MiscAbility to control the player's ability to jump with the "Player:
Constrain" Action when not using Point And Click movement
And thank you for the suggestions!
@Nick:
GetOptionStates() and GetOptionLocks() were removed due to not being necessary for AC anymore - sorry I missed that in the changelog. The data structure hasn't changed though - you could re-implement them in your own custom Action, since they just iterate through the Conversation script's public options List and adds each one's isOn / isLocked state to an array.
ActionListManager has an IsListRunning function - is that what you're looking for? There wasn't one by the name of AreActionListsRunning in v1.55 - what previous version were you upgrading from?
However, I'm getting a couple of errors when I try to add actions in the ActionList Editor.
-In the editor I right-click and select "Add new action" and nothing happens, then 2 errors come up:
1st error:
Instance of couldn't be created because there is no script with that name.
UnityEngine.ScriptableObject:CreateInstance(String)
AC.ActionListAssetEditor:AddAction(String, Int32, ActionListAsset) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListAssetEditor.cs:273)
AC.ActionListAssetEditor:ModifyAction(ActionListAsset, Action, String) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListAssetEditor.cs:420)
AC.ActionListEditorWindow:PerformEmptyCallBack(String) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListEditorWindow.cs:1939)
AC.ActionListEditorWindow:EmptyCallback(Object) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListEditorWindow.cs:1898)
UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)
2nd error:
NullReferenceException: Object reference not set to an instance of an object
AC.ActionListAssetEditor.AddAction (System.String className, Int32 i, AC.ActionListAsset _target) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListAssetEditor.cs:274)
AC.ActionListAssetEditor.ModifyAction (AC.ActionListAsset _target, AC.Action _action, System.String callback) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListAssetEditor.cs:420)
AC.ActionListEditorWindow.PerformEmptyCallBack (System.String objString) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListEditorWindow.cs:1939)
AC.ActionListEditorWindow.EmptyCallback (System.Object obj) (at Assets/AdventureCreator/Scripts/ActionList/Editor/ActionListEditorWindow.cs:1898)
UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, Int32 selected) (at C:/buildslave/unity/build/artifacts/generated/common/editor/GenericMenuBindings.gen.cs:122)
Copying and pasting current actions work just fine.
i also have some problems with crossfade, It only works instantly