Page 1 of 1

Issue with speech bubbles first animation

Posted: Wed Sep 04, 2019 9:22 am
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);
	}
}

Re: Issue with speech bubbles first animation

Posted: Wed Sep 04, 2019 11:10 am
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.

Re: Issue with speech bubbles first animation

Posted: Wed Sep 04, 2019 11:43 am
by nicmar
I will check if I can use what we discussed in https://www.pixelcrushers.com/phpbb/vie ... 037#p14037 instead. Thanks!