Page 1 of 1
Not grabbing non-instantiated but loaded prefab via GetSubject(x)?
Posted: Mon Apr 05, 2021 6:50 am
by fkkcloud
Hello,
Is it possible to prevent GetSubject in SequencerCommand to grab non-instantiated but loaded prefab?
Thank you
Re: Not grabbing non-instantiated but loaded prefab via GetSubject(x)?
Posted: Mon Apr 05, 2021 10:06 am
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?
Re: Not grabbing non-instantiated but loaded prefab via GetSubject(x)?
Posted: Mon Apr 05, 2021 5:37 pm
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.
Re: Not grabbing non-instantiated but loaded prefab via GetSubject(x)?
Posted: Mon Apr 05, 2021 6:23 pm
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.