Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

TopDownEngine 2.1 breaks samples (edited)

A topic by djdanlib created Jul 30, 2021 Views: 257 Replies: 5
Viewing posts 1 to 5
(2 edits)

edit: I originally thought this was Unity 2021.1, but it turns out there's a bad interaction with TopDownEngine 2.1 changing the project settings.

I'm running Unity 2021.1.15f1. Some things with the samples are wonky and this may be particular to this version of Unity. I know you call Unity 2021 an experimental release in the docs. It's not LTS, but it's not a beta either, so here is a list of the glitches I found. Most/all are possibly due to changes and bugs in Unity but this could be a checklist when they backport that mesh fix. (Any day now...) No URP or HDRP in my project. Most of these issues can be worked around, but it's not the best onboarding experience.

Caret: Doesn't animate reading at startup, but starts fully 'read'. You have to live-edit the text to have it start over.

StageScene: Doesn't show any text at all, at least for me.

Typing Input: This sample is pretty well borked. I know this isn't super useful feedback, it's just... the whole thing is broken. I think the text isn't drawing maybe. The text input receives keypresses but doesn't show what you're doing but does have shadows, the submit button doesn't have text, and the speech bubble text is invisible at startup.

UI & Pixel Snap: At startup, the Unity UI (top) text flashes cyan then turns gray.

UI Rect Match: Starts fully 'read'. You have to live-edit text to start over.

Underline and Strikethrough: Doesn't have underlines or strikethrough until you change the Text at runtime. Strikethrough line is behind the text.

When opening any sample scene, the console gets the following two messages, which seem to be okay:
E: "Component GUI Layer in Main Camera for Scene Assets/Clavian/SuperTextMesh/Sample/Append/AppendTest.unity is no longer available. It will be removed after you edit this GameObject and save the Scene. "
W: "Component at index 2 could not be loaded when loading game object 'Main Camera'. Removing it!"

Developer

Hey! I recently redid all my sample scenes so this is a bit disconcerting to hear... 


Caret: That first issue is due to how unity enters play mode. I've been wanting to change this behaviour for a long time. Basically. in-editor Unity starts counting Time.time up before any visuals can update. So... SuperTextMesh is set to read on start, but by the time Unity actually updates the game view, it's done. If you set the read delay to something slow, you can see it's working just fine. In a real-world scenario, this editor delay doesn't appear to happen when starting the game, loading scenes... but I'd still really like to figure out a way around it someday.

StageScene: I can't seem to reproduce this, I'm seeing text just fine in 2021...

TypingInput: This one, too! It's working fine for me in 2021.


UI & Pixel Snap: Also fine for me... what's going on...?

UI Rect Math: same as Caret.

Underline and strikethru: it looks like in the scene view that the strikethrough is rendering behind text, and this is because the prefab I'm using has the same UI Layer and order as the text. I'll change this for the next update. As for the strikethrough not reading on initial read... now *that* is strange. If I slow down the read delay, the underlines that are meant to happen *will* happen on the characters that are reading out. So... this won't happen in an actual built game, but this shouldn't happen in the first place because of how STM (is supposed to...) execute events. I'll take a look into this, but I think it's the same bug as the Caret issue and won't happen outside of the editor...? 

That last one I can fix for sure, I compile Super Text Mesh in a super-old version of Unity, and it looks like the GUI Layer has finally been removed. I don't think I use it for anything so... away it goes.


Anyway, that's about all I've got for tonight. Until I can reproduce those 3 issues I can't really help with them, the parts that are malfunctioning are completely new issues. I hope I can figure out the reading-before-playmode-actually-starts-in-editor issue though, it's caused me some issues in personal projects, despite being superficial.

This isn't the solution to the problem, but I'm curious why people are actually using 2021.1 for development...? Generally it's safer to stick to one of the LTSes. Cause if this really is the cause of some weird Unity behaviour... I can't really fix it and there's no point in it in the long run. But if 2021.1 has a new feature you need, stick with it!

(1 edit)

Working on repro'ing the issue to see if it's an interaction with another package.

Updated to the new Unity 2021.1.16f1, started a new 2D project, imported the Super Text Mesh package.

StageScene - shows text correctly but stops on the "This extra text here" section with the continuation message showing in the status bar / log.

TypingInput - shows text correctly and you can see interaction working. I don't see any kind of input caret like you'd normally see in a text box? I assume there isn't supposed to be one for the sample.

UI & Pixel Snap - forgot to test this before continuing on

Underline and Strikethru - strikethru shows in front of the text correctly when it reads out

Then I installed the other packages one by one to see if one of them breaks it. The culprit is apparently MoreMountains TopDown Engine 2.1, which puts up a suspicious message about importing a project and changing settings, and after importing I get the behavior previously noted with invisible text.

I will edit the post title since it does not appear to be the fault of Unity 2021.1 at this point.

edit: I'm also posting to their support at the Unity forums.

Developer (1 edit)

Is this only breaking the sample scenes? If you make a new scene with a brand-new super text mesh object, does it work fine? Or if you add a new Super Text Mesh to a scene in your game?


And the typing input scene doesn't have a caret, it's mostly just to demonstrate how to use tags.

Well, I'm trying to learn by looking at the samples. I tried it out and the following workaround sorta works too if I have a sprite with overlapped text, although I'm not really sure what I'm doing yet.

I figured out something that fixes the samples' text rendering. If I increase the Material > Render Queue setting by one, so it's 3001, the text becomes visible. If it's at the default 3000, it is invisible. Another poster on the Unity forum thread mentioned that TDE changes the sorting layers, so that's why strikethrough went behind the text.

Developer

I was able to reproduce the bug where text starts cyan and flashes grey, but I think this is just what happens when some text objects initialize for the very first time in an editor scene and quickly corrects itself. let me know if it appears in a build, though!


I'll make sure to change the render order of the strikethrus in the sample scene for the next build!