Group Items in templates like with ItemPopupAttribute

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Deadcow
Posts: 28
Joined: Tue Apr 30, 2019 8:21 am

Group Items in templates like with ItemPopupAttribute

Post by Deadcow »

I added Item property to Dialogue Entry template and all items in popup is not grouped
Image

With ItemPopupAttribute it looks fine
Image
Deadcow
Posts: 28
Joined: Tue Apr 30, 2019 8:21 am

Re: Group Items in templates like with ItemPopupAttribute

Post by Deadcow »

So I made tiny change in DialogueEditorWindowAssetLists.cs line 90

names.Add(new GUIContent(string.Format("[{0}] {1}", asset.id, asset.Name), string.Empty));
replaced with
names.Add(new GUIContent(asset.Name, string.Empty));

Is it some reason to put Id before the name?
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Group Items in templates like with ItemPopupAttribute

Post by Tony Li »

Hi,

Internally, references to items, actors, etc., store the ID, not the name. The dropdown menu shows IDs to remind you that it will store the ID:
assetByID.png
assetByID.png (17.09 KiB) Viewed 537 times
Deadcow
Posts: 28
Joined: Tue Apr 30, 2019 8:21 am

Re: Group Items in templates like with ItemPopupAttribute

Post by Deadcow »

It's not very helpful in my opinion. I made a field in Dialogue Entry template for designers to set when they building conversations, and instead of nicely formatted popup we've got a raw list of about a hundred of items, totally unusable :? Well maybe ID should go at the end after the name to keep nice formatting, or some another way to sort by ID.
Anyway, I'll keep my change then, no worries :)
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Group Items in templates like with ItemPopupAttribute

Post by Tony Li »

That's reasonable. In the next update, I'll change it to put the [ID] number at the end.
Post Reply