Accessing Actor Enum in Inspector

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
michaelheiml
Posts: 46
Joined: Thu Nov 08, 2018 5:47 am

Accessing Actor Enum in Inspector

Post by michaelheiml »

Hi Tony,

is there a way to access the database actors in the inspector view of a custom script as variable?
I have an array and want to select an actor from a dropdown, same like the actor dropdown list in the dialogue entry inspector view.

Michael
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Accessing Actor Enum in Inspector

Post by Tony Li »

Yes, use the [ActorPopup] attribute:

Code: Select all

using PixelCrushers.DialogueSystem;
...
[ActorPopup]
public string actor;
michaelheiml
Posts: 46
Joined: Thu Nov 08, 2018 5:47 am

Re: Accessing Actor Enum in Inspector

Post by michaelheiml »

Hi Tony,

thanks for your suggestion, but it only works partially.

The dropdown is shown, but when I change one value of the list, all values are changed - see screenshot (I change e.g. "Flynn Kiss" ActorDB to "Flynn" and all ActorDB variables are changed at once (also those of Hannah in the given example).
Screenshot 2018-11-09 at 16.20.10.png
Screenshot 2018-11-09 at 16.20.10.png (109.11 KiB) Viewed 654 times
User avatar
Tony Li
Posts: 22057
Joined: Thu Jul 18, 2013 1:27 pm

Re: Accessing Actor Enum in Inspector

Post by Tony Li »

That's a limitation that I addressed yesterday in the 2.0.6 update, which should release today after the completion of all QA tests.
michaelheiml
Posts: 46
Joined: Thu Nov 08, 2018 5:47 am

Re: Accessing Actor Enum in Inspector

Post by michaelheiml »

Works great, thank you!
Post Reply