A Possible Integration with Look Animator

Announcements, support questions, and discussion for the Dialogue System.
huxley84
Posts: 5
Joined: Mon May 18, 2020 1:13 pm

Re: A Possible Integration with Look Animator

Post 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?
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: A Possible Integration with Look Animator

Post by Tony Li »

Hi,

What parameters are you passing to the LookAnimator() sequencer command?
huxley84
Posts: 5
Joined: Mon May 18, 2020 1:13 pm

Re: A Possible Integration with Look Animator

Post 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.
huxley84
Posts: 5
Joined: Mon May 18, 2020 1:13 pm

Re: A Possible Integration with Look Animator

Post 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.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: A Possible Integration with Look Animator

Post 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.
Post Reply