Issue with speech bubbles first animation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Issue with speech bubbles first animation

Post by nicmar »

I'm having a problem with the first animation of any speech bubble subtitle panel, which i mentioned in another thread.

If I have Start State > Closed, the gameobject is inactive, and the first time it shall play, the animator is not playing, and when you start a dialog, it just pops up, without an animation.

If I have Start State > Open, the gameobject is active, but onstart of the game, it shows the bubble. After that the animation works though.

So I made this script as a workaround, where it waits 1 second, then enables the speech bubble gameobject.

I don't know if I caused this myself somehow, but I haven't found a way around it without this script.

Code: Select all

public class DialogueActorInitNPC : MonoBehaviour {

	public GameObject speechBubbleGameObject;
	
	private void OnEnable() {
		StartCoroutine(nameof(ActivateDelay));
	}

	IEnumerator ActivateDelay() {
		yield return new WaitForSeconds(1);
		speechBubbleGameObject = GetComponent<DialogueActor>().standardDialogueUISettings.customSubtitlePanel.transform.gameObject;
		speechBubbleGameObject.SetActive(true);
	}
}
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issue with speech bubbles first animation

Post by Tony Li »

Hi,

Can you compare your setup to the Bubble Subtitle Example on the Dialogue System Extras page? In the Bubble Subtitle Example, the bubble subtitle panels play their Show animations correctly when they first open.
nicmar
Posts: 133
Joined: Wed Aug 21, 2019 2:39 am

Re: Issue with speech bubbles first animation

Post by nicmar »

I will check if I can use what we discussed in https://www.pixelcrushers.com/phpbb/vie ... 037#p14037 instead. Thanks!
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
Post Reply