Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

KaiClavier

558
Posts
10
Topics
563
Followers
62
Following
A member registered Jul 23, 2014 · View creator page →

Creator of

Recent community posts

If you want to try and make a change yourself, inside of SuperTextMesh.cs there's a large array named "linebreakFriendlyCharacters" and another for unfriendly characters... I think. It might be that I forgot 「 or put it on the wrong list?

Hello,


Honestly, I don't think I can look at it this week... Big life changes just happened, so I need to take the week off for the first time in a long time. 


For the time being, is it possible to leave a bit of extra room on the right side of the text box? I really do want to revisit this, I just remember it being a very tricky issue, so I really don't want to give a time promise...

Huh, I think this has to be due to an old workaround I did where STM inserts a zero-width space at the end of closing tags to make sure event tags at the end of strings get called... In *that* instance, the extra read time I *think* makes sense since the event is called at the start of that "invisible" character... but maybe I should remove it since the event could be counted as being called at the end of the string, anyway...?


So... not sure if I should leave this, or make it so the self-inserted zero-width spaces don't count as totalReadTime... I *think* in the situation of events at the end of a string, the latter may cause events to be ignored when restoring a string?

I'll give it a look shortly! But yeah that doesn't sound right... it should use the linebreak rules for japanese unless break text is turned *on* (which just, ignores formatting)

Maybe there's a rule I missed in regards to 「 characters so I'll give it a look next

(1 edit)

Just to finish off this thread, (I know, I haven't been marking threads as "solved"...) we discussed further through email, and this should now be fixed as of 1.13.3!

Thank you for understanding! I really can see the value in it now though, so it's something I'd like to add sometime, too. I'm glad you found a working solution, though!

Right, double outlines could be useful! STM's main use is dialogue text, but as a damage pop up that would be really useful to have! Hm... that gives me an idea for a way to implement that... Ok I'll think about it for sure, then!  But I can't give a time estimate... sometimes shader things turn out to be easy, and sometimes they turn out to take years... But a hard-coded solution that's less-than-efficient should be possible to hack together over a weekend! But I'd want something fully customizable without code for a full release.

Hey!

Hm, out of the box, an effect like that isn't possible. If you're handy with shaders though it would be possible to edit the two types of outline shaders that come with STM to have additional colour passes! The "Universal" shader would just need more passes added that reference a different colour, and the "Ultra" shader would need... probably just a couple more calls to the function that draws outlines, but with different distances & colours.

Eventually I'd like to extend the new Ultra shader to be able to support effects like this (outline & dropshadow at the same time is planned first, though!) but it's not a very common effect for dialogue text, so there's other things I need to prioritize first, sorry!


Oops, sorry about that broken link, should be fixed now! How long was that there for...?

Thank you for your inquiry!

-Kai

I got the email! Will give it a look soon!

Would it be okay to have a look at your loading code? If the <w> tag is being sent to STM, and then STM is rebuilding... it *should* be animating... Is there anything going on with timeScale in your game, maybe? Is there a difference if "ignore timeScale" is enabled in STM? It's enabled by default so it may not be that, but it's worth checking!

I'll give it a close look this week! Thank you so much for your patience

Hmm... is Rebuild() being invoked when reloading? It could be that the variable that tells text to animate isn't being triggered somehow... Does enabling "force animation" make any difference for you? When text rebuilds, STM has an internal timer it keeps to animate text, so something may not be updating.. somehow.

right, i think one of my reasonings for leaving it in was that I was making a lot of textboxes with ample whitespace on the sides at the time (like the sample scene) but for something with a scrollrect... I'll revisit my line-end algorithm soon! It might be a bit since it's a low priority and you already have a workaround and I've been very busy recently, but I do want to make this change!

Hey!


This is something that's been in STM for a long time, and I kept wondering if I should change it or not... essentially, it works like this so that as it inserts hyphens, the rest of the mesh doesn't change to accommodate this, and manual hyphens get included in this too.

I really should revisit this and make it work in the way that would feel more natural, though. I feel like I would have tried to make it work that way and hit some wall in the past, but maybe I can come up with a real solution, now.

Hello!


Super Text Mesh just renders the data from the font directly, so not all fonts will be aligned with one another.

What I recommend is...

For text that uses a single font, you can edit the "baseOffset" variable to align the font how you like. But for multiple fonts, you can use the <y=offset> tag to offset text vertically.

So a string could look like... "ABCDEFG<f=chinese><y=0.2>你好</y></f>" (With 0.2 being whatever offset the text needs)

You can simplify this further by using Super Text Mesh's "Voices" data! If you create a voice named "chinese" with this text: "<f=chinese><y=0.2>", then all you have to type in your script is "ABCDEFG<v=chinese>你好</v>" !


I hope this information helps!

Hm, I'm not sure if I'm able to tell what the cause of the issue is from this screenshot, would it be possible to record a gif? What shader are you currently using? Is this in-editor, or in a build? What Unity version is it?


I just published a new update, so please let me know if v1.13.2 works for you! I made some changes to the "Ultra" shader, so maybe that's the cause here? There was an issue with rendering bitmap fonts on the previous update.

Ok, I think I've finally got a proper fix for this. Will be publishing an update shortly! The error seemed to be: I had those icons set as textures used by quads to show certain buttons to press in sample scenes, but as icons assigned to scripts/unity UI elements, that seemed to cause some kind of conflict.

Ok, I think I've finally got a proper fix for this. Will be publishing an update shortly! The error seemed to be: I had those icons set as textures used by quads to show certain buttons to press in sample scenes, but as icons assigned to scripts/unity UI elements, that seemed to cause some kind of conflict. 

Hmm, I'd believe it being a Unity bug, because without HideInspectorStuff(), there's no call to HideFlags whatsoever... I may just have to hard-code it so that whenever Unity tries to make a build (onpreprocessbuild?), the Fix() code is called...?


I'll take one more look soon before resorting to that method though, the fact it may be related to an initialization even will help! Thank you so much for your patience and help!!

Ok, perfect. I should have a new update out soon that this error shouldn't appear in.

gah I didn't consider this when I added the new class. It's just a warning not an error, correct? It should be fine to ignore for now, and I'll adjust it so it doesn't report an error in the next update. Sorry!

This problem has been reported for a while and as far as I can tell, I can't seem to find any code that would change the hideflags of the file whatsoever, so I thought the script to manually change the hideflags would solve it for good... Hm... maybe because the file is an icon to a script, that script could be having a hideflag applied to it and that's passed on to the icon somehow...? I do have some code within STM that changes the hideflags of the meshfilter and meshrenderer components, but I can't see how it's related to the icon... I'll be able to take another close look at this soon, sorry for the delays. But this really is a strange problem that's been bigger than it has any right to be. This is very good information though, if it's something happening just during editor runtime, that narrows down where the problem is.


If you want to test something for me, within the file "SuperTextMesh.cs" there's a method named "HideInspectorStuff". if you remove everything within that method, does the problem still occur? This is the part of the code that sets the meshfilter and meshrenderer hideflags I mentioned. I haven't been able to reproduce the bug in a while so that would be a huge help!

Put that code on any gameobject, drag in the files causing the error into the field, click the gear icon in the top-right of the component and select "Fix" from the dropdown menu!

Hey, replying to you here since it's a duplicate issue.


https://pastebin.com/0M2kf8D6 Here is the script I wrote that fixed the issue on my end, and what I did to the file before publishing. If you run this script on the same file, does the issue still persist? If so, I need to dig deeper as to why me running this code didn't fix it for everyone else, and if not... well I guess it's back to the drawing board. Sorry for the trouble! It seems that a few other assets have been effected by this type of error, too... If all else fails, it's just a bad .png file that can be deleted and everything else will work fine.

Ok, uploaded a fix for this (Hopefully correctly, this time...) As a note, the build number is the same (v1.13.1)

gah oh my god thank you for catching that, as you can see in my patch notes, I was supposed to fix that not building, but messed it up in another way... Really sorry about that! Will patch it soon

Hey! Before I look into this, did you upgrade to the latest version, 1.13.1? There was an issue with the masking in the shaders in the previous version. You may have to refresh some materials, though... I can give it a closer look soon if it still persists!

Ah hm, maybe something with the upgrade doesn't fully work since it's a change to metadata... could you delete the icon & its metadata file and try re-importing STM?

Right, I didn't post but I think I was able to fix this one, actually. It'll be fixed in the next update!

Hello,

Hm, I was aware of the opacity issue, hopefully it's something that can be fixed easily, but I've been having trouble getting in contact with the person I contracted to help write the shaders. I'm really sorry about that.

Outline and shadow together is planned for URP, but isn't possible at the moment for the same reason, sorry!

It'll just pick the first data that matches that it finds in the folder. And yeah, I wish Unity had a bit more control over that when updating assets, but I feel like I have to have the defaults I already have included, or they'll just never be used/have to be created over and over.

I think you should be safe to delete the originals and make new ones, and then just be careful when re-importing in the future. If you were to import a double, you'd just have to delete the extra for STM to work as expected - it'll just go through the folder and find the first file that matches the requested data

Hm, maybe reimporting the asset failedsince some of the new files have the same names as old ones? Try clearing the STMAutoDelays folder and try again, the files in there *should* be a new type! There should be a file named "comma_jp" that does the behaviour you want by default if you're seeing it right.

Oh that could actually help a lot with fixing this. I'm glad the rest is working, though!

Oh, you're completely right, I must have broken render on top with the new update. (I'm now setting the value manually in STM, I must have got it mixed up with a UI variable...)

I've got it fixed now, and while it was a simple fix, it involved changing around a lot of files. If you want a quick update now, please email me with the invoice you received, otherwise I'll be sure to push this update the moment that issue with quads & the new shader is resolved!

I've been meaning to send out an email to everyone who has asked in the past about URP & outlines, but haven't gotten around to it yet... but please try out the new "STM Ultra" shader for outlines! 

The Universal ones are just a fusion of the last ones (Combining Normal & UI shaders, but still using different shaders for outlines & dropshadows) to reduce the total included shader count, and they're still used in the default materials. Eventually I'll probably phase out the Universal shader entirely but hey it works and it's a bit easier to modify for custom use than the Ultra shader.


You may experience a small issue with quads at the moment, but I'm hoping to have that fixed quickly, and *then* finally notify everyone who has asked about this in the past. Thank you so much for your patience!

No, I was never able to reproduce it, even after doing builds with projects that contain STM. But yeah it could just be some Unity thing related to Editor folders, then...?

Huh, I think I received a bug report about this a while ago and I checked to make sure the hide flags were correct, and it looked fine at the time... So I'm not too sure what might be changing the hide flags, actually...?

Since the icon is used on the data components, I wonder if it could be related to some kind of hide flag being applied to that? I'll keep thinking about this but if it's happening in another asset too, there may be some other common thing making it happen. For the other asset, is it also applied to a ScriptableObject?

Hello! Sorry for the delayed response. 

Here's how it looks pasting the headline from that article into STM, it does look like there's a difference:



...So unfortunately, it doesn't look like it works out of the box. I'm trying to look for a third-party script that would adjust the text for rendering in Unity, but for some reason they either require specific fonts to be used, or are things people don't want to share online. But I know it's got to be possible... If you can find a script that adjusts the text and it works with what Unity has built-in, it will work with STM. But from my inexperience with Indian languages, I don't think I can write this kind of script myself. (Like how I didn't write the bulk of the Arabic language support, just the part that connects it to STM)

I'll see what I can do! I guess I can see some use for disabling the automatic rebuild, now.

Hmm that's probably being called by OnRectTransformChanged()... I think Unity UI tends to call that a lot, but I'll see if something can be done...?

I just pushed an update to STM last night that adds natural masking support with a "Universal" shader, and added it to the UI shaders, too. But I'm not sure if it's possible to tell when a certain effect is hidden by a mask? My rule with STM is... I don't want it to become more or less efficient as text is reading out. So instead of disabling code that updates gradients when those gradients are hidden... the gradients should just be more efficient in the first place.

Would it be possible to run your localization help through STM's OnPreParse() event? I can still add this as a bool but things like localization tools are great for the preparse event, imo!