Page 2 of 2

Re: A Possible Integration with Look Animator

Posted: Thu May 21, 2020 12:17 pm
by huxley84
Hello, I've implemented this extension with the Third Party Support, added the FLook Animator and Look Animator Dialogue Actor components on my Player and NPCS, but I receive this error when the first speaker begins in the dialogue tree.

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandLookAnimator.Awake () (at Assets/Pixel Crushers/Dialogue System/Third Party Support/Look Animator Support/Scripts/SequencerCommandLookAnimator.cs:29)
UnityEngine.GameObject:AddComponent(Type)
PixelCrushers.DialogueSystem.Sequencer:ActivateCommand(String, String, Transform, Transform, String[]) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:723)
PixelCrushers.DialogueSystem.Sequencer:PlayCommand(QueuedSequencerCommand, String, Boolean, Single, String, String, String[]) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:672)
PixelCrushers.DialogueSystem.Sequencer:PlayCommand(QueuedSequencerCommand) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:641)
PixelCrushers.DialogueSystem.Sequencer:PlaySequence(String) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:575)
PixelCrushers.DialogueSystem.Sequencer:PlaySequence(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:585)
PixelCrushers.DialogueSystem.ConversationView:StartSubtitle(Subtitle, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:172)
PixelCrushers.DialogueSystem.ConversationController:GotoState(ConversationState) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Controller/ConversationController.cs:208)
PixelCrushers.DialogueSystem.ConversationController:OnFinishedSubtitle(Object, EventArgs) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Controller/ConversationController.cs:264)
PixelCrushers.DialogueSystem.ConversationView:FinishSubtitle() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:397)
PixelCrushers.DialogueSystem.ConversationView:OnFinishedSubtitle() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:404)
PixelCrushers.DialogueSystem.Sequencer:FinishSequence() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:498)
PixelCrushers.DialogueSystem.Sequencer:Update() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:491)
I'm not using collision triggers on my characters (Dialogue Manager controls all interaction), which I think is the problem. Is there an easy way for me to remove this requirement of the Look Animator extension, and instead just populate the potential assigned targets to every character in the scene that has the LookAnimatorDialogueActor component assigned?

Re: A Possible Integration with Look Animator

Posted: Thu May 21, 2020 1:30 pm
by Tony Li
Hi,

What parameters are you passing to the LookAnimator() sequencer command?

Re: A Possible Integration with Look Animator

Posted: Thu May 21, 2020 3:32 pm
by huxley84
LookAnimator(player, target_character,all);

After getting your reply, I removed 'all' which sounded like it isn't needed. Then everything looks like it's working without errors, so I guess that was the problem.

Re: A Possible Integration with Look Animator

Posted: Thu May 21, 2020 3:34 pm
by huxley84
Is there any way to set a characters look animator to nothing after they have been looking at a target? Effectively just having them look in their default bone position.

Re: A Possible Integration with Look Animator

Posted: Thu May 21, 2020 5:09 pm
by Tony Li
The Extras page now has an updated Look Animator integration package. You can pass 'none' as the first parameter to tell the character to look at its original follow target.