Hi - wonder if you could please advise? I'm using this script from the AC Wiki. It mostly works but the issue I'm finding is that the text appears where it shouldn't before it's momentarily teleported to the correct place above a player's head. If I just use Text Mesh pro, this issue doesn't occur, so I suspect it's either something with Super Text Mesh, or the script.
Vid to demonstrate:
Script:
using UnityEngine; using System.Collections; public class SuperTextFromACSpeech : MonoBehaviour { /* This script is to make Super Text Mesh work with Adventure Creator. Essentially, it lets AC handle all non-text elements (sound effects, user input), while letting STM handle all text-related issues (scrolling speed, animations, colors, etc.) Simply put this script on a Super Text ui item in your subtitlesUI adventure creator menu, then hide the text item that AC thinks it's referencing (put it offscreen, make it invisible, whatever!). AC will play dialogue sounds and handle input as normal, but the player will only see the Super Text. Script by @johndaguerra. No credit needed, but I'm cool and it'd make me happy if you followed me on twitter! */ SuperTextMesh supertext; AC.Speech speech; AC.Dialog dialog; void Start () { supertext = GetComponent<SuperTextMesh>(); dialog = FindObjectOfType<AC.Dialog>(); } void Update () { //If there is dialogue currently being spoken... if (dialog.GetLatestSpeech() != null) { //And you haven't already sampled it... if (speech != dialog.GetLatestSpeech()) { //Then set the supertext text to print the dialogue speech = dialog.GetLatestSpeech(); supertext.color = speech.GetColour (); supertext.Text = speech.log.fullText; //This tells the text to read at regular speeds, in case it was told to speed read supertext.RegularRead(); } } if (supertext.reading == true) { if (Input.GetMouseButtonDown(0) || Input.GetKeyDown("space")) { //If the player clicks or presses space while reading, then speed read supertext.SpeedRead(); } } } }
Wonder if any tips to fix it, please? I've tried changing the Canvas Fade to 0, and putting this script higher up in the execution order (and a bunch of other fiddling) but that still doesn't sort it.
I've asked the creator of the script for advice but he says it's so old he wouldn't know whether it's a script issue or an update to Super Text Mesh that'd be causing the glitch.