Forum rules - please read before posting.

Error when trying to Gather Text

edited June 2016 in Technical Q&A
I recently updated my Unity version up to 5.3.5 from 5.3.1.  After the update, when I tried to Gather Text in the Speech Editor I get this error:

NullReferenceException: Object reference not set to an instance of an object
AC.SpeechManager.GetActionListAssetsFromActions (System.Collections.Generic.List`1 actions) (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:2323)
AC.SpeechManager.SmartAddAsset (AC.ActionListAsset asset) (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:2267)
AC.SpeechManager.GetAllActionListAssets () (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:2193)
AC.SpeechManager.PopulateList () (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:580)
AC.SpeechManager.ShowGUI () (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:264)
AC.AdventureCreator.OnGUI () (at Assets/AdventureCreator/Scripts/Managers/Editor/AdventureCreator.cs:222)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

image
I have reassigned all the managers and added some new dialogue, but other than that I can't remember anything else that I have changed.  When I double click on the error in the Console I get another error:

!m_IsGettingEntries
UnityEditor.AssetDatabase:SaveAssets()
AC.ManagerPackage:AssignManagers() (at Assets/AdventureCreator/Scripts/Managers/ManagerPackage.cs:104)
AC.ManagerPackageEditor:OnOpenAsset(Int32, Int32) (at Assets/AdventureCreator/Scripts/Managers/Editor/ManagerPackageEditor.cs:51)
UnityEditorInternal.LogEntries:RowGotDoubleClicked(Int32)
UnityEditor.DockArea:OnGUI()

image

If anyone can help me it would be appreciated.  If the problem is because I updated Unity and shouldn't have, I'll just revert and go back to the previous Unity version.  The only reason I want to try to get this fixed is because I added a lot of new dialogue after updating and wouldn't like to lose all that work.

Comments

  • It's more likely that there's an issue with one of your Actionlists rather than the Unity version you're using.  While this fix won't sort the original issue with the ActionList, it should make the "Gather text" button work again:

    Open up SpeechManager.cs and find the line that starts with "private void GetActionListAssetsFromActions".  Then find the line within that block:

    foreach (Action action in actions)
    {


    And after the open brace, type this in:

    if (action == null) continue;

    Does that fix the problem?
  • You are probably right about there being an issue with an ActionList because the code you gave me sorts out the error when I click on Gather Text, but now the problem I get is that the lines are not assigned any file names for audio files.

    I don't have any errors or warnings to show because there are none.  I'll go back and take a look at all the ActionLists that I have to find any problems on them.
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.