Hi,
i have 2 Subtitles panels with Visibility= always from start
And their name should be disabled at start with > On Open() GameObject.SetActive = false
my issue is at the start of the conversation, both of their name are showing.
Any idea why ?
Both panel name at start
Re: Both panel name at start
Hi,
Thanks for the "up." I'm sorry; I don't know how your message slipped by. Add this script to your subtitle panel(s):
HideNameOnOpen.cs
Thanks for the "up." I'm sorry; I don't know how your message slipped by. Add this script to your subtitle panel(s):
HideNameOnOpen.cs
Code: Select all
using System.Collections;
using PixelCrushers.DialogueSystem;
using UnityEngine;
public class HideNameOnOpen : MonoBehaviour
{
private void OnEnable()
{
StartCoroutine(HideNameAtEndOfFrame());
}
IEnumerator HideNameAtEndOfFrame()
{
yield return new WaitForEndOfFrame();
var panel = GetComponent<StandardUISubtitlePanel>();
panel.portraitName.gameObject.SetActive(false);
}
}
Re: Both panel name at start
Thank Tony, that worked.
Re: Both panel name at start
Glad to help!