Not grabbing non-instantiated but loaded prefab via GetSubject(x)?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Not grabbing non-instantiated but loaded prefab via GetSubject(x)?

Post by fkkcloud »

Hello,

Is it possible to prevent GetSubject in SequencerCommand to grab non-instantiated but loaded prefab?

Thank you
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Not grabbing non-instantiated but loaded prefab via GetSubject(x)?

Post by Tony Li »

Hi,

GetSubject() will only grab the prefab if the conversation is using the prefab as the primary Actor or Conversant. Can you configure the conversation to use a scene object or null as the Actor or Conversant?
fkkcloud
Posts: 298
Joined: Mon Oct 05, 2020 6:00 am

Re: Not grabbing non-instantiated but loaded prefab via GetSubject(x)?

Post by fkkcloud »

It seems to grab a completely not related prefab (not instantiated one)

For instance, if the Actor name was Jenny.
It grabs the one in a UI main menu which has a object name of Jenny but this is just a UI component in the main menu.
Also it is not instantiated prefab.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Not grabbing non-instantiated but loaded prefab via GetSubject(x)?

Post by Tony Li »

Hi,

Please see: Character GameObject Assignments

It will grab a GameObject in this order:
  • If you have specified the GameObject in DialogueManager.StartConversation() or assigned it to a Dialogue System Trigger's Conversation Actor or Conversation Conversant.
  • Otherwise it will look for a GameObject that has a Dialogue Actor assigned to the actor.
  • Otherwise it will look for a GameObject whose GameOBject name matches the actor's name.
Post Reply