Make SequencerCommand.cs GetSubject() prioritize children
Posted: Fri Apr 09, 2021 12:56 pm
Hello!
Im having an issue right now using shared dialogue:
- I have one dialogue that used by multiple characters. I've assigned a generic actor from the Database. In this dialogue I have a lot sequencers command (AnimatorPlay, CinemachinePriority, LookAt, Timeline...)
-In my scenes I have multiples actors (with their hierarchy containing animators, virtual cams, transform used for sequences,...). Those actors each have a Dialogue Actor component with a unique name.
-I start this conversation assigning the transform of this unique actor from script like this:
It worked fine when I have had one instance of those actor in the scene. However with multiple ones, I start to get weird results.
For example if my sequence is :
I was expecting the priority of the camera name "CM actorCam1" thats also a child of the current speaker to be changed, but unfortunately that's not what happens: it changes the priority of another random camera with the same name in my scene. Same thing for other sequencer commands like AnimatorPlay.
So my question is: Can I (and should I?) change the way the GetSubject() methods work in the SequencerCommand.cs, to try and first look for an transform with a matching name in children of the speaker first?
Thank you!
Im having an issue right now using shared dialogue:
- I have one dialogue that used by multiple characters. I've assigned a generic actor from the Database. In this dialogue I have a lot sequencers command (AnimatorPlay, CinemachinePriority, LookAt, Timeline...)
-In my scenes I have multiples actors (with their hierarchy containing animators, virtual cams, transform used for sequences,...). Those actors each have a Dialogue Actor component with a unique name.
-I start this conversation assigning the transform of this unique actor from script like this:
Code: Select all
DialogueManager.StartConversation(targetConversation, this.transform, this.transform,entry);
For example if my sequence is :
Code: Select all
CinemachinePriority(CM actorCam1, 999);
So my question is: Can I (and should I?) change the way the GetSubject() methods work in the SequencerCommand.cs, to try and first look for an transform with a matching name in children of the speaker first?
Thank you!