Forum rules - please read before posting.

Update 1.56 - Performance and refinement

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
«13

Comments

  • Profiles
    • 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:
      The "Options.SwitchProfile" and "Options.SwitchProfileIfExists"
      functions have been renamed to "Options.SwitchProfileID" and
      "Options.SwitchProfile" respectively
    Speech
    • 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:
      For in-game changes to Journals to be saved, pages must now be listed
      in the Speech Manager by using the "Gather text" feature
    • 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
    Menus
    • 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:
      Ability to control the player's ability to jump with the "Player:
      Constrain" Action when not using Point And Click movement
    • 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
    Misc
    • Added: OnContainerAdd and OnContainerRemove events, which are called when the player changes the contents of a Container
    • Added: The UFPS Integration script now demonstrates how the HUD and crosshair can be hidden while AC's Pause menus are open
    • Added: Public function _OnGUI () to StateHandler.cs - use to call AC's OnGUI code manually
    • Added: Flash hold time slider to Highlight component
    • Fixed: "Default Action" changing when new Actions are listed in the Actions Manager (after upgrading)
    • Fixed: Screen Arrows not responding to drag input on Touch Screen devices
  • Wooow . Great update. I really appreciate all that your hard works.
  • Jipiiiii! Thank you :-)
  • Thanks for all the hard work - especially adding all that performance stuff!
    • Added: Ability to create new Integer variables directly from the "Variable: Run sequence" Action
    Booya! AC is the gift that keeps on giving. Thanks for all the hard work
  • This one's for you, @ChrisIceBox


  • Hello,

    Thanks for the great update. I am really happy with AdventureCreator. I have a question.

    I have seen that in this update, beside many changes Logic/Conversation no longer has 2 methods.
    GetOptionStates ();
    GetOptionLocks ();

    I used that for ActionDialogOptionCheck to check the status in action list for certain conversations. What is the work-around or should I just implement those methods back?
    Thanks again.
  • Also I noticed that ActionListManager no longer has a method called AreActionListsRunning

    If I reimplement this method will it work in the grand scheme of things? 
    :)
  • @ilmari:
    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?
  • Thanks for the quick reply.

    I have re-implemented those functions already. They were very useful for me.
    I had 1.54 before, but I added that AreActionListsRunning function and it seems to work great.

    I only have a minor problem with Menu/InventoryItem Pickup And Drag, the icon seems "cut". I am looking into that.

    In rest everything seem to work great. :)
  • @Nick: I don't know what you mean by "cut", but please post in a new thread in Technical Q&A when you have more detail to share.
  • I use inventory item with "icon only" display and I had the size set as "automatic" and that made the image icon to show only a few pixels from the top. The height was wrong. But setting the size to manual for that menu item solved my problem.

    Thanks for everything!
  • I have a problem with InventoryItem->InventoryBox filter by category. 

    If I add a filter from a certain category, by example with id=1, during gameplay if defaults to the category 0, the first one.

    image


    I have attached the image to show you what I mean. I found that inside MenuInventoryBox.cs the List categoryIDs receives the right ID inside the UI function, but during gameplay, inside the LimitByCategory() it has the wrong ID being set.

    I have done an external fix for this setting the right category during runtime.

  • What external fix did you do?  LimitByCategory looks fine to me, and I can't recreate the issue.  Please post details in a new thread in Technical Q&A.
  • Thanks for the update, Chris! Especially am grateful for the dialogue updates :)

    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.
  • edited March 2017
    @jasong: This appears to be a duplicate of this issue.  Could you answer the same questions and perform the same steps as I advised in that thread?  It's a critical issue and needs to be solved properly.
  • Version 1.56a
    • Added: Ability to use a Sorting Map to scale characters according to an Animation Curve, as opposed to linearly between areas
    • Added: Ability to resume a music track when playing or crossfading to a previously-played track with the “Sound: Play music” Action
    • Added: Option to Footstep Sounds component to only play sounds when the character is grounded
    • Added: OnVariableChange event - called whenever a Global or Local variable’s value is changed either through Actions or via scripting
    • Added: Ability to set the Animator component of Mecanim-based characters explicitly (will continue to rely on the root Animator if not set)
    • Added: Ability to skip speech via the SkipSpeech input only, as opposed to also by mouse-clicks
    • Fixed: ”SkipSpeech” input not always listing in Settings Manager’s list of available inputs when it should be
    • Fixed: Critical error when creating new Actions in v1.56
  • Thank you for the SkipSpeech :)

    May someone tell me the C# Code for letting me know a Dialogue/ Conversation is being played,  that way I can put a "Next" Button on the screen?

    Thanks 
  • edited March 2017
    @kici: If Dialog's GetLatestSpeech() doesn't return null, speech is playing.
  • hi, good news with the "Ability to resume a music track".
    i also have some problems with crossfade, It only works instantly
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.