Editing the Canvas of my Dialogue

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
palecerulean
Posts: 3
Joined: Tue Jun 18, 2024 5:56 am

Editing the Canvas of my Dialogue

Post by palecerulean »

Hey guys, :ugeek:

I am very new to Unity and am creating a dialogue-based game for my thesis project. I've run into a problem with the editing of the Canvas (inlcuding the Dialogue Panel etc.) of my Dialogue System. I imported the Dialogue System into my new scene and set the initial database to my prepared and saved conversation. I then encountered the problem of the Canvas of my initial conversation being only visible and editable in play mode. I resolved that problem by just copying that Canvas into the edit mode window and changed the Default Canvas to said copied Canvas. Unity is now still using the old Canvas though and does not implement the changes that I am making in edit mode into play mode on my Dialogue Panel.

Let me know what I can do about this as I really have no idea how to fix this. It seems as if I should not have copied the Canvas from play mode but I did not know how to get it to be editable otherwise.

Thank you for any help and if you need more information on my project to help met, let me know. Thanks in advance!

Lilith
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Editing the Canvas of my Dialogue

Post by Tony Li »

Hi Lilith,

Have you had a chance to watch the dialogue UI video tutorials? (Links to videos at the top of that link.)

Try this:

1. Remove the extra Canvas that you added to the Dialogue Manager GameObject if it's still there.

2. UNassign the Dialogue Manager's Display Settings > Dialogue UI field.

3. Identify a dialogue UI prefab that you'd like to start with as a base, such as Plugins > Pixel Crushers > Dialogue System > Prefabs > Standard UI Prefabs > Templates > Basic > Basic Standard Dialogue UI. Assign this to the Dialogue Manager's Display Settings > Dialogue UI field. A pop-up window will ask if you want to add an instance or use the prefab. Select Add Instance. This will create an instance of the dialogue UI inside the Dialogue Manager's Canvas. You can customize this instance to look however you want.

Once you're happy with your dialogue UI and the other settings on your Dialogue Manager GameObject, I recommend dragging the GameObject into the Project view. A pop-up window will ask if you want to create a new prefab or a prefab variant. Select Prefab Variant. Then add this prefab variant to any other scenes in your Unity project. This will allow you to playtest those scenes directly without having to come from a scene that has a Dialogue Manager.
palecerulean
Posts: 3
Joined: Tue Jun 18, 2024 5:56 am

Re: Editing the Canvas of my Dialogue

Post by palecerulean »

Thank you so much! I watched all the tutorials but I think something went wrong in between. I followed your steps and was able to solve my problem.

If you don't mind answering another question: I have imported an animated character (simple loop animation) into my game and the animation was working in Unity until I dragged in the Dialogue System. I then redid the Animator and everything to see if that would make it work and even created an Avatar off of my model to see if that's the problem, but the animation is still not playing. Any tips?

Thanks so much, Tony – when buying this asset I had already heard lots about you in all the positive reviews so thanks for keeping up this great service of helping everyone. :)
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Editing the Canvas of my Dialogue

Post by Tony Li »

Hi,

Glad to help!

Is your animated character a 2D character or 3D character? Does the animation not work at all, or does it stop when conversations are active?

If it stops when conversations are active, are you pausing the game during conversations? For example, if you've ticked the Dialogue System Trigger component's Pause Game During Conversation checkbox, this will pause the game, which may pause your character's animator.

Also, are there any errors or warnings in the Console window?
palecerulean
Posts: 3
Joined: Tue Jun 18, 2024 5:56 am

Re: Editing the Canvas of my Dialogue

Post by palecerulean »

Hey, thanks again for your reply!

My character is a 3D character. The animation does not work at all – not in the editor nor the play mode.
Yes, the error is that my AnimationEvent on my animation has no receiver. An I am being asked if a component is missing. I tried googling this error but there is not much to find about this error. Maybe you can help? I tried replacing the Animator and reconnecting my animation to my Avatar but nothing has worked until now...

Thanks in advance,
Lilith
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Editing the Canvas of my Dialogue

Post by Tony Li »

Hi Lilith,

The animation will still play even if an animation event on it has no receiver.

Can you preview the animation? For example, if I select the original model in the Dialogue System's Demo scene (located in Plugins > Pixel Crushers > Dialogue System > Demo > Art > Recon Troop > Model) and select the Animation tab, I can preview the animations to make sure they play.

previewAnimation.png
previewAnimation.png (118.42 KiB) Viewed 167 times

Are the animations built for your character, or are they Humanoid? (When a model is imported as Humanoid and an animation clip is imported as Humanoid, you can play the animation on the model even if it wasn't build for that model.)

humanoid.png
humanoid.png (19.35 KiB) Viewed 167 times

Can you preview the animation in the Animation window (menu item Window > Animation > Animation)?

animationWindow.png
animationWindow.png (387.05 KiB) Viewed 167 times

If all of that works, on your character's Animator component, what is the Update Mode dropdown set to?

Enter play mode, and play to the point where the animation should be playing but isn't. Select menu item Edit > Project Settings. In the Project Settings window > Time section, what is Time Scale set to?
Post Reply