Hi guys,
Everything Sam showed works fine. I added serialized voice clips to each node with a getter and that worked fine. The problem I’m having is with the Speaker’s avatars that I added. the avatars show up perfectly however I keep receiving this persistent parent error when it instantiates the avatar with a SetParent() to the DialogueUI. Any thoughts as to why this could be happening? The video is below and I’ll post the code beneath that.
if (newAvatar != null)
{
Destroy(newAvatar.gameObject);
}
avatar = playerConversant.GetSpeakerAvatar();
if (avatar != null)
{
newAvatar = Instantiate(avatar, avatar.transform) as GameObject;
newAvatar.transform.SetParent(transform, false);
}
Also there’s another issue which I’m trying to fix in the video below. tl;dw, essentially the UI only activates if it is marked as active before running the game and the game itself disables it before the first frame otherwise it throws a null reference. is there anyway to refactor it so that even if the ui was disabled before play, it would still add an event listener for the convo to start?
Thanks