Bark on idle and UI smooth follow

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
pinkwerks
Posts: 5
Joined: Mon Nov 29, 2021 3:00 pm

Bark on idle and UI smooth follow

Post by pinkwerks »

Hello I'm trying to use screen space canvas. I have a GameObject, "Rat" that I've added Bark On Idle and UI Smooth Follow to. I've also added the Basic Standard Bark UI prefab as a child and changed the render mode to screen space - camera.

If I play the scene, the UI Smooth Follow gives me this error "Assign a UI to UISmoothFollow on Rat." - but I can see the bark OK.

If I assign the child BasicStandardBarkUI to the UI field of UISmoothFollow, I get this error "Dialogue System: Bark (speaker=Rat (UnityEngine.Transform), listener=null): 'Rat barks' speaker has no bark UI".

Things seem to go wonky in DialogActor.cs the GetComponentInChildren seems to return null?

Code: Select all

return (dialogueActor != null) ? (dialogueActor.barkUISettings.barkUI as IBarkUI) : t.GetComponentInChildren(typeof(IBarkUI)) as IBarkUI;
Attached screenshot if it is helpful, thanks!
Attachments
Screenshot 2024-10-19 085225.png
Screenshot 2024-10-19 085225.png (485.85 KiB) Viewed 66 times
User avatar
Tony Li
Posts: 22091
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bark on idle and UI smooth follow

Post by Tony Li »

Hi,

I updated the UISmoothFollow example (direct download) with a bark example scene and a _README.txt file with tips on setting up the bark UI's Rect Transform.
pinkwerks
Posts: 5
Joined: Mon Nov 29, 2021 3:00 pm

Re: Bark on idle and UI smooth follow

Post by pinkwerks »

Brilliant, thanks for this sample!
User avatar
Tony Li
Posts: 22091
Joined: Thu Jul 18, 2013 1:27 pm

Re: Bark on idle and UI smooth follow

Post by Tony Li »

Glad to help!
Post Reply