Bug?: Item localisation fields copied to dialogue entries

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
tomb
Posts: 19
Joined: Fri Sep 30, 2022 8:23 am

Bug?: Item localisation fields copied to dialogue entries

Post by tomb »

Hi Tony

I've had an intermittent issue, going back several months, where I've seen localisation fields for Items copied to Dialogue Entries in a conversation. I originally thought I had done something wrong in the templates but it has happened a few times now, when I haven't been touching templates. I think I've noticed the pattern.

I'm using Dialogue System 2.2.47 and Unity version 2021.3.2f1.

Dialogue Entries template
Dialogue Entries template.png
Dialogue Entries template.png (21.69 KiB) Viewed 105 times

Items template
Item template.png
Item template.png (42.92 KiB) Viewed 105 times

To recreate the issue:

1. Open the Conversation tab

2. Select a Dialogue Entry (note: there are only the "es" and "fr" localistion fields)
Select Dialogue Entry.png
Select Dialogue Entry.png (87.19 KiB) Viewed 105 times

3. Go to the Items tab (Note: the Dialogue Entry is still selected and showing in the Inspector, no extra fields yet)
Open Items Tab.png
Open Items Tab.png (66.8 KiB) Viewed 105 times

4. Scroll down the item list (without clicking on an Item) or alt-tab to another program and back to Unity
- Not sure exactly what the cause is, but scrolling or alt-tabbing is a reliable way to recreate the issue for me

5. The localisation fields from the Items template are added to the Dialogue Entry (visible in the Inspector)
Fields Copied to Dialogue Entry.png
Fields Copied to Dialogue Entry.png (71.38 KiB) Viewed 105 times

Result
From now on, back in the Conversation tab, any other Dialogue Entry I click on in this conversation has the same localisation fields added to it as well (I think only happens when clicking on the other entries).

I often copy nodes from one conversation to another, so if I don't notice it's happened I can "infect" several conversations in a short amount of time with the localisation fields being added whenever I click another node.

I can clean it up with a find and replace, manually editing the database to remove the fields from the impacted Dialogue Entries when Unity is closed, but I hope there can be a fix to prevent it happening in the future.

Related Feature Request
In my initial attempts to clean up the Item fields copied to Dialogue Entries I would go to Templates and click "Update Templates from Assets" (to add the copied fields to the Dialogue Entries template) then click the minus button to delete the field and click "ok" to remove all instances of the field.

However, this applies to all assets in the database that have fields with this name. So, for example, if trying to delete "Shop Description fr" from all Dialogue Entries, it would also delete the field from all Items in the database.

My request is that, is it possible that when deleting a field from a template and saying "ok" to remove all instances, that it can just remove the field from that asset (e.g. only remove from Dialogue Entries if removing a Dialogue Entries template field) rather than every asset (Dialogue Entries, Items, Locations etc) in the database?

This would be very useful, even when the copying fields bug is resolved, as it is not unlikely that I'll create fields with the same name for different assets.

Thank you

Tom
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bug?: Item localisation fields copied to dialogue entries

Post by Tony Li »

Hi Tom,

Thanks for reporting this bug. I'll get it fixed in v2.2.48 and also add an option to only remove the field from the specific asset type (e.g., Dialogue Entry).
Post Reply