Hi Chris,
Wonder if you could please help. I'm using Super Text Mesh in my SubtitlesUI and it's been working well, but breaks when switching scenes. After a scene switch, all Subtitles UI in the new scene incorrectly display the last used dialogue from the previous scene, regardless of which character spoke it.
I'm using the script from the AC Wiki:
https://adventure-creator.fandom.com/wiki/Super_Text_Mesh_subtitle_integration
I've placed the script on the SubtitlesUI Prefab, specifically on the txtSubtitles object.
That subtitles object has a Constant ID component, as well as a hidden TextMeshPro component on it (having TMP, even though hidden, is the only way I've been able to link the Super Text Mesh subtitles object to the AC menu in the past)
However, when I look now, I see in the AC Subtitles menu that the 'Linked Text' is showing 'None (Text)' but the Recorded ConstantID of the txtSubtitles object is correctly showing. I can't seem to reconnect it, even if I enable the Text Mesh Pro component.
I wonder if you could please advise? I'm stumped. The Super Text Mesh setup works ok in a single scene, but seems to get stuck on the last used dialogue when changing scenes, whenever dialogue is spoken in the new scene.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Huh - turns out turning on the 'Duplicate for each line' setting in the AC Menu seems to have solved it.
Nice.
Hi Chris, I'm encountering a new problem, that was maybe always there but I've only started noticing it now: I'm using UnityUI for Subtitles, and am noticing that the subtitles appear very quickly in the middle of the screen before correctly appearing above the player's heads. Any idea how to fix this please?
I'm using Super Text Mesh along with the script on the Wiki. Even if I turn off 'Canvas Fade' it doesn't help the issue.
I can remedy the problem by deselecting 'Duplicate for each line?' option in the menu, but then I run into the problem mentioned in the first post in this thread.
Hmm...
After plenty testing it seems like it's related possibly to the way the ACWiki script integrates 'Super Text Mesh' because when I disable Super Text Mesh on the Subtitles Canvas element and just use Text Mesh Pro, the temporary placement issue is solved.
I think the ACWiki script is positioning the text in the right place a little too late, so the text is appearing at the Prefab origin and only being moved above the character's head a moment later.
Wonder if any way to solve this.
Can you share the script? I seem to have a bit of an issue accessing the wiki page right now.
Hi Chris - sure, thanks, it’s this one:
[edit: [pasted from comp, and included the
https://adventure-creator.fandom.com/wiki/Super_Text_Mesh_subtitle_integration
I asked the creator about it but he says he wouldn’t know or even remember the script from 9 years ago. I can’t seem to comment it as code from my phone
supertext.color = speech.GetColour ();
line that the script on the wiki doesn't have.In case useful or in case it might affect things, this is my SubtitlesUI setup. Was a fairly convoluted setup to get the background colour box of the text to conform to the text amount, and for setting the min and max horizontal size the text box could be (took me a couple days of fiddling and watching and rewatching various tutorials, perhaps second nature to some but defs not for me).
Try this:
Hi Chris, thanks - I get this compilation error:
Assets/bbsugar/Scripts/SuperTextFromACSpeech.cs(39,41): error CS0122: 'PlayerInput.InputGetMouseButtonDown(int)' is inaccessible due to its protection level
Ah - I asked KaiClavier (the author of Super Text Mesh) about this and he gave some suggestions, the first of which (replacing "supertext.Text" with "supertext._text") seemed to do the trick:
https://itch.io/t/5397155/issue-with-adventure-creator-and-super-text-mesh#post-14425498
I tried to make a contribution to the ACWiki's integration script (and also added the line:
supertext.color = speech.GetColour ();
So that the script uses the character's subtitles colour, but struggled to get the script formatting to appear correctly with the web editor.