Quick question regarding RandomElement function no longer working

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Keiji
Posts: 17
Joined: Tue Feb 18, 2020 2:29 pm

Quick question regarding RandomElement function no longer working

Post by Keiji »

Hi Tony!

I have a quick question regarding our update to a new unity version. We recently switched from version 2019.3.11f1 to version 2020.3.4.1f1 LTS and so far, everything seems to have worked out ok regarding the dialogue System. The only thing we noticed is that the random element function we used in many dialogues seems to not work anymore (attached a screenshot of the error log).

Here are the questions:

1. Is there a way to fix that safely?

2. Do you recommend switching to the latest dialogue system version, too, now that we are on a new Unity Version? (I am
guessing that would fix the issue as well)

We have a bunch of custom UIs and sequencer of commands and are a bit worried that more of our project will break if we make the update. Currently we are not adding any more tools, so if the random element function is the only thing that needs to be fixed we would be happy to stay with the current dialogue system version. However, if you do not recommend that we would look into updating that.

Wishing you a great start into the new year,

Keiji
Attachments
BugRandomElement.JPG
BugRandomElement.JPG (28.81 KiB) Viewed 320 times
User avatar
Tony Li
Posts: 21636
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quick question regarding RandomElement function no longer working

Post by Tony Li »

Hi,

I recommend backing up your project and updating to the latest Dialogue System version. If you're using a significantly older version of Unity, it may not have changes needed to handle newer .NET changes in Unity 2020, or something similar.

Have you switched your project to use NLua instead of the Dialogue System's default Lua environment by any chance?
Keiji
Posts: 17
Joined: Tue Feb 18, 2020 2:29 pm

Re: Quick question regarding RandomElement function no longer working

Post by Keiji »

Hi Tony, thanks for the quick reply.

We never switched our project to NLua, we are still using the default environment. Do you think switching to NLua may help in our case? Or did you ask because switching might have caused this?

Ok, will backup and update to latest Dialogue System. Hope that works :)

Keiji
User avatar
Tony Li
Posts: 21636
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quick question regarding RandomElement function no longer working

Post by Tony Li »

No need to switch to NLua. Try updating DS.
Post Reply