Bark Instance Not Set on an Object When Adding Standard Bark UI
Posted: Sun Jan 02, 2022 3:27 pm
by UnPixTheCat
Hello.
I got Unity Dialogue System today and so far it has been very buggy when I have been trying to follow the tutorials. Doing one Tutorial somehow breaks the previous one but that is not the issue.
The issue is that I am trying to follow them to see what I can create and I am only on Bark, the 3 tutorial and when I try to add the Dialogue Actor with the prefab Template Bubble "Bubble Template Standard Bark UI" to the Bark UI, I get this:
I understand I need a Standard UI to display it, as without it I get warning messages with the bark messages inside of them saying I need a BARK Standard UI. But how do I implement that when doing so causes NULL references? Help?
2022-01-02 21_38_15-Window.png (98.08 KiB) Viewed 740 times
Re: Bark Instance Not Set of an Object
Posted: Sun Jan 02, 2022 3:42 pm
by Tony Li
Hi,
Thanks for making a forum post.
Did you get the Dialogue System from the Unity Asset Store?
What version of the Dialogue System are you using? It's listed in the Welcome window (menu item Tools > Pixel Crushers > Dialogue System > Welcome Window) and in Plugins / Pixel Crushers / Dialogue System / _README.txt.
Are there any other errors or warnings in the Console window?
Thank you for pasting the full stack trace details of the NullReferenceException. In version 2.2.23, line 197 of StandardBarkUI.cs doesn't contain any code that can cause a NullReferenceException.
I suspect that maybe you have an old or corrupt version of the Dialogue System.
Here's a playable scene made using the same steps as the Bark Tutorial, except that it uses the demo's dialogue database instead of creating a new database:
Re: Bark Instance Not Set on an Object When Adding Standard Bark UI
Posted: Sun Jan 02, 2022 3:48 pm
by UnPixTheCat
Hello.
I got it today. It is version 2.2.23. I have a suspicion the Import and Download are not working properly as I had to re-download and re-import it since the first time I added it was full of errors. I followed the Tutorial:
But somehow the Dialogue Actor section just is not working with the error and image I sent.
Did you get the Dialogue System from the Unity Asset Store?
What version of the Dialogue System are you using? It's listed in the Welcome window (menu item Tools > Pixel Crushers > Dialogue System > Welcome Window) and in Plugins / Pixel Crushers / Dialogue System / _README.txt.
Are there any other errors or warnings in the Console window?
Thank you for pasting the full stack trace details of the NullReferenceException. In version 2.2.23, line 197 of StandardBarkUI.cs doesn't contain any code that can cause a NullReferenceException.
I suspect that maybe you have an old or corrupt version of the Dialogue System.
Here's a playable scene made using the same steps as the Bark Tutorial, except that it uses the demo's dialogue database instead of creating a new database:
I get the same error with the test scene. I just do not understand. The Dialogue Actor with Bark UI is broken for me. I tried to re-import and download everything again.
Re: Bark Instance Not Set on an Object When Adding Standard Bark UI
Posted: Sun Jan 02, 2022 3:58 pm
by UnPixTheCat
I do not understand if it is something just broken with my Unity, as I tried on a separate project to follow the next tutorial by downloading the Standard Unity Assets and that package was full and full of errors.
Re: Bark Instance Not Set on an Object When Adding Standard Bark UI
We're working on updated tutorials for the ones that use Standard Assets. We had hoped to use Unity's Starter Assets package for them, but they have their own issues, such as requiring the new Input System package which would unnecessarily add another layer of complexity. So we'll be providing some new assets to accompany the updated tutorials.
Did the Quick Start and Conversation Conditions tutorials work correctly for you?
Apart from the Standard Assets package, were there any other errors or warnings in the Console other than the original one you posted above?
When you play the example scene I provided above, you should hear the Capsule play an enemy bark audio clip. As soon as you hear the audio clip, pause the scene. Does the Capsule have a child named "Bubble Template Standard Bark UI(Clone)"? And is the Text child object's text set to the same audio that's being played? (In the screenshot below, the audio/text is "You're going down!")
barkUI.png (90.71 KiB) Viewed 732 times
Re: Bark Instance Not Set on an Object When Adding Standard Bark UI
Posted: Sun Jan 02, 2022 4:16 pm
by UnPixTheCat
My Unity is 2020.3.25f1.
The Standard Package was just an outdated script that needed GUIText to just say Text. I resolved that.
But I still do not understand why I cannot make a Bark Pop Up Bubble appear. Not even in the test scene, you sent me. I do not get an Audio prompt or anything. The moment it tries to Bark I get sent the error message about the missing instance.
Along with what I sent above about the Bark UI not finding an Instance I get this:
Dialogue System: The scene is missing an EventSystem. Adding one.
UnityEngine.Debug:LogWarning (object)
PixelCrushers.DialogueSystem.UITools:RequireEventSystem () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Utility/UITools.cs:40)
PixelCrushers.DialogueSystem.StandardUIQuestLogWindow:Awake () (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Standard/Quest/StandardUIQuestLogWindow.cs:104)
UnityEngine.Object:Instantiate<UnityEngine.GameObject> (UnityEngine.GameObject)
PixelCrushers.InstantiatePrefabs:OnEnable () (at Assets/Plugins/Pixel Crushers/Common/Scripts/Misc/InstantiatePrefabs.cs:37)
2022-01-02 22_14_56-Window.png (121.01 KiB) Viewed 732 times
Re: Bark Instance Not Set on an Object When Adding Standard Bark UI
Posted: Sun Jan 02, 2022 4:20 pm
by Tony Li
You can ignore the "Dialogue System: The scene is missing an EventSystem. Adding one." warning. It's just saying that there's no EventSystem, so the Dialogue System is creating one. An EventSystem is required for Unity UI to recognize input.
In your project, what is line 197 of Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Standard/Bark/StandardBarkUI.cs?
(I have to step out of the office for ~45 minutes, but I'll reply as soon as I get back in.)
Re: Bark Instance Not Set on an Object When Adding Standard Bark UI
Posted: Sun Jan 02, 2022 4:27 pm
by UnPixTheCat
2022-01-02 22_25_50-Window.png (57.4 KiB) Viewed 728 times
Line 197 is:
portraitImage.sprite = speakerPortrait;
which means that having None in Portrait might be what is causing the issue?
Re: Bark Instance Not Set on an Object When Adding Standard Bark UI
Posted: Sun Jan 02, 2022 4:38 pm
by UnPixTheCat
BTW, QuickStart and conversation Tutorials worked perfectly fine. It is just something not working on Barks for me and has something to do with the Dialogue Actor as I tried different methods to trigger it. But the failure is always on the Bark bubble / Dialogue Actor.
I have to go to bed since I am working tomorrow so I will have to see if I can resolve this tomorrow.