Playing an animation upon starting a dialogue
Re: Playing an animation upon starting a dialogue
Keep the Animator window open on your Blur GameObject. Does it transition into the animation state(s) you want and stay there? Or does a transition arrow make it transition back to some state you don't want?
-
- Posts: 73
- Joined: Tue Jul 25, 2023 1:34 am
Re: Playing an animation upon starting a dialogue
Well the last time it worked, it played the blurring animation (which is just the image going from transparent to fully visible) but it returned to ita original state.
Re: Playing an animation upon starting a dialogue
Try removing the transition arrow anyway so it doesn't do that.
-
- Posts: 73
- Joined: Tue Jul 25, 2023 1:34 am
Re: Playing an animation upon starting a dialogue
Which one do i change? Im still a little confused on what you mean? Im sorry
Re: Playing an animation upon starting a dialogue
Hi,
I'm making three assumptions:
1. Your GameObject is named "Blur".
2. The animator controller assigned to the GameObject's Animator is set up like in your previous screenshot. This has an animation state named Blur that links to an animation state named Blurred.
3. When the animation clip assigned to the Blur state is done, the arrow leading from Blur to Blurred switches the Animator to the Blurred state's animation clip.
If this is the case, then make sure the Blurred state does what you want it to do -- presumably to keep the image blurred.
I'm making three assumptions:
1. Your GameObject is named "Blur".
2. The animator controller assigned to the GameObject's Animator is set up like in your previous screenshot. This has an animation state named Blur that links to an animation state named Blurred.
3. When the animation clip assigned to the Blur state is done, the arrow leading from Blur to Blurred switches the Animator to the Blurred state's animation clip.
If this is the case, then make sure the Blurred state does what you want it to do -- presumably to keep the image blurred.
-
- Posts: 73
- Joined: Tue Jul 25, 2023 1:34 am
Re: Playing an animation upon starting a dialogue
OKay yes, I think I see how it works. How do I change the "Blurred" state then? I'm looking online and I'm getting a bit of information overload.
-
- Posts: 73
- Joined: Tue Jul 25, 2023 1:34 am
Re: Playing an animation upon starting a dialogue
Okay ... I think I have fixed it, actually. Had to finagle it into working
Re: Playing an animation upon starting a dialogue
Great! I'm glad you got it working.
-
- Posts: 1
- Joined: Wed Aug 09, 2023 7:47 am
Re: Playing an animation upon starting a dialogue
I'm still having trouble with panels and I just think it would be easier if I just had it where I invoked an animation for a separate element
Re: Playing an animation upon starting a dialogue
In that case, if you need to do this in a specific dialogue entry you can use AnimatorPlay() sequencer command.
If you need to do it whenever the dialogue UI opens, the Dialogue Panel has a UI Panel component. This component has OnOpen() and OnClose() UnityEvents. You can invoke the blur in the OnOpen() UnityEvent.
If you need to do it whenever the dialogue UI opens, the Dialogue Panel has a UI Panel component. This component has OnOpen() and OnClose() UnityEvents. You can invoke the blur in the OnOpen() UnityEvent.