Forum rules - please read before posting.

Unity totally hangs when I click on "Speech" under AC Game Editor

When clicking on "Speech" under AC Game Editor I was surprised by Unity hanging and the following error message repeating itself endlessly in the console:

ArgumentOutOfRangeException: Cannot be negative.
Parameter name: length.

A screenshot is attached for your reference.


Any idea of what's going on?

Thanks!!

Haritha

Comments

  • edited August 2017
    Apologies for the trouble.  In what version is this occuring?

    We'll need to see the full error so that we can get to the bottom of it - please click on any of them and copy the full message that appears beneath it when selected.

    If you are using v1.58a (the latest release), it may be that this is a duplicate of this issue - in which case, please follow the steps I gave in that thread and see if that makes a difference.
  • Hello Chris,

    Thank you for your quick response. I have downloaded the latest update (I'm always up to date) and imported everything ticked by default EXCEPT FOR the resources file. Strangely enough--and although I downloaded and imported the last update--it says the version is 1.57b.

    I quickly gave you the information you requested the moment I read your message--I still have not tried your solution (I will do it now and let you know how it goes).

    Here is the full message below. Thanks!!

    ArgumentOutOfRangeException: Cannot be negative.
    Parameter name: length
    System.String.Substring (Int32 startIndex, Int32 length) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/String.cs:348)
    AC.SpeechManager.GetSceneNames () (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:410)
    AC.SpeechManager.ListLines () (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:464)
    AC.SpeechManager.ShowGUI () (at Assets/AdventureCreator/Scripts/Managers/SpeechManager.cs:387)
    AC.AdventureCreator.OnGUI () (at Assets/AdventureCreator/Scripts/Managers/Editor/AdventureCreator.cs:240)
    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)

  • Update 1.

    In my version (1.57b) I found the line:

    languageIsRightToLeft

    in several places the last of them was line no. 2764. Does the additional line need to be placed before or after the bracket is opened?
  • edited August 2017
    After the opening brace "{" - though this appears to be a separate issue, in fact.

    Where is the version reported wrong - in the Manual, or at the bottom of the AC Game Editor window?

    It looks like this is to do with the placement of the scenes listed in your Build settings.  Where are they located in your Project, and do they contain special characters in their filenames?
  • Ah okay. I haven't messed with the code yet.

    It says 1.57b  both at the bottom of Game Editor's window and the About window. I repeat that only the day before yesterday I downloaded the latest update and imported all elements as set by default EXCEPT for "Resources" which I unticked.

    My Unity version is 5.6.2f1.

    The scenes listed in my Build setting are all placed directly under the Assets folder (which is parent to both my game folder as well the AdventureCreator folder). I used spaces, commas, numbers, and dots but other than that no special characters were used.
  • Up.

    The problem still persists. Hope Chris or someone has some ideas.

    Thanks. :)

    Hari
  • Remove all special characters from your filenames.  Spaces and numbers are fine, but commas, full-stops and slashes must be removed.
  • Finally worked. You rock Chris!!
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.