Page 1 of 1

Bark on idle and UI smooth follow

Posted: Sat Oct 19, 2024 11:54 am
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!

Re: Bark on idle and UI smooth follow

Posted: Sat Oct 19, 2024 3:06 pm
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.

Re: Bark on idle and UI smooth follow

Posted: Sun Oct 20, 2024 4:23 pm
by pinkwerks
Brilliant, thanks for this sample!

Re: Bark on idle and UI smooth follow

Posted: Sun Oct 20, 2024 5:04 pm
by Tony Li
Glad to help!