🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

KaiClavier

90
Posts
5
Topics
195
Followers
33
Following
A member registered Jul 23, 2014 · View creator page →

Projects

Recent community posts

Taking care of this on your other thread: https://itch.io/t/190198/quadsimages-arent-displaying-at-all

From your other post, it seems that you're using Unity 5.4. I'm taking a wild guess and guessing that you're using STM with Unity UI. Unity UI didn't support multiple materials until Unity 2017.1, so quads are disabled in earlier versions. Sorry about that, but there just seemed to be no way around that in earlier versions, and it would always cause a crash.

I'm going to have to suggest either upgrading to 2017.1 or avoiding Unity UI. If you really wanted, you could set something up with custom events to place UI elements to imitate Quads, but that should just be a last resort.

Oh huh, I don't /think/ there should be a reason for that, so that must be it? I could swear it was getting registered under both? I sent you an email with the beta, but I'll get on this in just a bit, sorry!

Let me know what you find!

It's always a weird combo of relief and fear when a bug manages to "fix" itself...

I really should download 2017.3 to see if I can repro this, cause I've had no luck doing this in 5.3.4 or 2017.1.

The only real things I can think of that will solve this are...

In SuperTextMesh.cs, if you ctrl+F "OnFontTextureRebuilt", you'll find a function that should be getting added to an event called Font.textureRebuilt... this event should be getting added under Init(), and removed under UnInit()... Maybe the problem is that it's getting added too many times, and if the textbox is being enabled/disabled, the event handlers are getting confused?

Send me an email through my website, and I'll send you a beta build! I'll try making it so these handlers are only called once no matter what.

(Edited 2 times)

Hey!

I can't believe this bug is back once again... I've been using 2017.1 myself so maybe it's something with 2017.3...?

You're right in the cause of it, it's caused whenever the font atlas gets updated, but STM doesn't rebuild for some reason. STM is subscribed to an event that gets invoked to call Rebuild() whenever its font atlas updates, but for some reason it doesn't always call Rebuild()...? I thought I fixed this 100% before, but I've learned a lot about events in the past few months, so I'll revisit that code and see if it's something to do with that. I am curious if it has something to do with that name box having bolded text, though.


In the meantime, you can avoid font atlas updates altogether if you set your game's font to be non-dymanic. (Go into your font's import settings and change that there) The only downside to non-dynamic fonts is that you can't adjust their quality, and they dont do bold/italics. You can change this in the font's import settings.


I'll look into this again shortly, sorry for the inconvenience!

Ah okay, I'll try playing with differently sized canvases and see if that makes it happen. I'll also play around with enabling/disabling mipmapping on text.

Hey!

Giving it a shot today, and I'm actually having trouble getting this to happen.

Could you tell me what version of unity you're using, and give me a screenshot of both your parent canvas's inspector and your text object's inspector? If possible, link me to the font you're using, too!

Hey - I'll give this a look tomorrow, but I have a few guesses in the meantime. My outline shader could be screwing up in a few different ways - either the outlines aren't rendering right with alpha, or it could be casting shadows it's not supposed to? Not sure what would be receiving the shadows, maybe something I'm overlooking with worldspace canvases?

I'll test it out tomorrow and get back with a solution ASAP! That title text is looking great btw, and this is really good info for me to use, thanks!

I've seen this error pop up before, butnever actually cause any issues until now. This helped pinpoint it!

Adding "if(onCompleteEvent != null)" before the code on line 1121 seems to make everything work fine!

I'll publish the patch shortly!

Hey! Good eye, never noticed this in specific.

Those variable wrap distances have gotta be put in manually, I think...? It's gotta just be manual line breaks I think. I can think of a way to do it automatically, but not a way to do it automatically and get good results every time.

If you're cool with manual line breaks, you can just set Super Text Mesh's anchor to be "Middle Center" (if you're using UI text, just align it "middle"), and then set the alignment to "left"? If autowrap is off (or on!) that should deliver the right result?


Also while testing this I realized that line breaks are acting pretty weird for middle-anchored text, so I'll be working to fix that shortly, sorry about that!

This might be a good chance to explain my price point!


I'm not sure how new you are to game dev, but another asset on the Unity Asset store, "Text Mesh Pro" used to be priced at $65 while in beta when my asset was released. While my asset was in beta, it had a price of $35. Out of beta, TMP went up to $95, and I decided to take their old price point since I now felt STM had surpassed everything I wanted from a text asset, while being more user-friendly.


I felt $65 was agreeable as a price point because I wanted to hit some specific numbers. Something not too high, because I deeply want this asset to be used by new developers, and I don't want to have anyone need to slog through creating a text system ever again. It took me 8 months to get a beta release, and I'm still working on this years later. I put in that time so you don't have to.

I also didn't want to price the asset too low, as Unity has some pricing guidelines I wanted to respect, and I also had myself I wanted to respect! I put in a lot of time into this project, and it needed a pricepoint to let people know that it's a serious asset that does what it does and does it well.

I settled on $65 after long deliberation with multiple colleagues since $65 is just about a day and a few hours worth of work at $8/h, and trust me, it's going to take you much, much longer than that to get a text system like this up and running.


Even after Text Mesh Pro got bought by Unity and went free, my sales have continued to rise! People seem to like what I'm offering better, even when my lead competitor went free. That said, if you're still irked about the pricepoint, Unity occasionally has seasonal sales, and I am opted into this program and match any asset store price changes here on the itch.io page, so you can wait for that if you want. No guarantees though, I don't control who gets those participation emails!


Anyway, I'll just mark this topic as "solved". ;)

Solved this in v1.6.2!! Sorry this took so long, I never had a good repro of the problem until recently.

Sweet! I'll implement this and upload a new version shortly. Thank you so much for the repro!

First thing I noticed was that the text in the new scene is there for a single frame before disappearing. Also, Rebuild() is being called, and I set up a debug to check this. If I tell a mesh to not Rebuild() under Async single loading, the 1-frame flash doesn't happen. Even more interesting, this appears to only be effecting UI text! I added a non-Unity UI Super Text Mesh object to the scene, and it survived the load just fine.

I do notice that with debug mode enabled, the new scene's STM object doesn't appear to have an internal material. This material is still there when I switch the load mode to additive, so this has the be the cause of the problem.

It looks like if I tell STM to wait a frame before Rebuild() is called, it seems to work fine? As far as I can tell, it's not even flashing for the one frame it's not supposed to be there for. Give this a shot and lemme know what you think, and let me know if you see it blink for one frame. If it does, Rebuild() will just have to be called again, right before that "yield return null" line.


On line 821 of SuperTextMesh.cs, replace everything in the #if statement with these functions:


void OnSceneLoaded(Scene scene, LoadSceneMode loadSceneMode){
    if(this != null){
        if(loadSceneMode == LoadSceneMode.Single){
            StartCoroutine(WaitFrameThenRebuild());
        }else{
            Rebuild(autoRead);
        }
    }
}
IEnumerator WaitFrameThenRebuild(){
    yield return null;
    Rebuild(autoRead);
}

Thanks for the repro! I've been meaning to look into this Async loading issue for ages, but never got a repro for it.

The current solution is calling SuperTextMesh.RebuildAll() when the scene is done loading, but now with this repro I'll hopefully find a real solution shortly. Thanks!

Hey! This is the support forum for Super Save Loader! Make sure to check out the docs!

Hey!

I've never used Wwise before, but if it has functions similar to Unity's built-in audio source, it can probably be swapped out?

The only major functions you'd need are Play() and Stop(), and some way to change the pitch of an audio source, and what clip is currently being used. Try making the "audioSource" variable an "AkSoundEngine" instead of an "AudioSource", see what breaks, then replace with similar variables? I'm completely guessing at the functionality of this class, but this is how I'd do it!

For the text wrap, try checking and unchecking the "break text" boolean, that setting should be the cause of what you're describing! It's good for some situations, but not most.

Published a fix, hopefully it all works good, I'm supposed to be heading to sleep r/n

Hey, working on it now, just figured out the cause. The offset is being applied before the lowest line is calculated. Just gotta figure out a way around this

actually nvm this one's my fault, this is being caused by some code related to indents

It's effecting empty strings, since the code is trying to get the indent of the first character in a string, which doesn't exist.


Replace line 1907 with this:

Vector3 pos = new Vector3(info.Count > 0 ? info[0].indent : 0f, 0f, 0f); //keep track of where to place this text

and line 1921 with this:

 float lineWidth = info.Count > 0 ? info[0].indent : 0f;

I'll publish a hotfix right now!

Hey! The playmaker actions haven't been updated in a long time, and were written by a pal, since I don't use playmaker myself. I'll get them to take a look at it!

Posted in [solved] Period

Pushed an update so this wont be an issue, thanks for catching it!

Posted in [solved] Period

Hey!

Fuck I completely fucked up on this one, I wasn't thinking when I made that new update. I added a new field called "auto voice" to TextData, it's under the "master" foldout. Just clear that string and it'll remove the dot, I'll push an update without it right now. It was supposed to effect just the demo, but I forgot it'd end up as default for everything, too

Published it! On itch already and should be on the asset store shortly.

#4 done, indents are in!

The float value determines the indent in localspace, so resizing the text keeps the indent at the same spot. I wanted it to be just an "<indent>" tag that sets the indent to be at the letter it was typed at, but all my autowrap code takes place before my positional data I'd need, so I'd have to redo that section to get it working that way. But I think this should be a good fix for now!


I'll publish the update soon, but I want to see if I can get one or two other features working first, since this will be a new version number. Drop me an email and I'll send you a build of what I currently have if you want, though!

Also, there's an exposed variable named "lowestLine" now, which holds the latest line drawn by STM. So if you don't like the scrolling effect I did, that can be used to create your own!

#3 is in! Mother 3 style dialogue boxes are something I really can't believe I forgot.


It'll be out in the next update, which is hopefully soon if I can get the <indent> tag in shortly!

Fixed #2, forgot to rename a field from ages ago. On line 288 of SuperTextMesh.cs, change "STMClipData" to "STMAutoClipData".

Alright, working on the first bug.  I was able to recreate it by having a very long string, then a delay, and more text after.

STM is supposed to only be able to play a sound in the reading out loop if the latest letter being read is a different one than the last frame, so... ok got it.

The issue is that every frame the mesh is updated, it'll say "the last letter that was read was X", so it'll only play the sound of the latest letter that was read. So the issue is caused by the mesh moving so fast, the last letter that was read could be... 40, and the delay is at 80 and lasts 1 second, so the mesh will try to play the sound for everything between 40 and 80 as it catches up.

On line 1127, replace the if statement with this one:


if(myAnimPos > 0f && !undrawingMesh && i > latestNumber){
    DoEvent(i); //do every event up to this integer
    if(!playedSoundThisFrame){
        PlaySound(i); //only play one sound this frame, from the first letter drawn this frame
    }
    latestNumber = Mathf.Max(latestNumber, i); //find latest number to start from next frame
}


The variable "playedSoundThisFrame" replaces "foundLatestNumber", so change the name of the boolean on line 1111, too.

Hey!

In STM's resources folder, change the object named "TextData" to "SuperTextMeshData". This was changed in v1.5 to avoid any future conflicts with other assets. I wanted to remove the dependence on this object to avoid this problem popping up, but was having issues replacing the info this ScriptableObject holds with static variables. Sorry about that!

Hey!

Not too sure what's causing this, would it be possible to send me a link to a sample project? My best guess is that it's some kind of material issue or shader issue? I renamed some shaders in the last update, so maybe it's trying to use the wrong one?  That's my best guess from this screenshot.

Are there any errors being returned in the console?

Ah right, quads won't draw on Unity UI in Unity versions older than 2017.1, since it'd cause a nasty crash before that, sorry about that!

There's no event to subscribe to yet, I think only the index of the current letter being read out is exposed. The value could be exposed, but it would just be an integer of the current line. Another way this could work is that... STM puts a line break character (\n) at the end of each row, so that could potentially be used, too? I'm trying to think of the most user-friendly way to fix this...

Working on other fixes now!

Hey!

These are very good bugs, lemme go at em one at a time

1. This one's weird... Maybe the audio script isn't keeping up with the actual read out script...? maybe the indexes are getting mixed up? I'll give it a look tomorrow, it's gotta be some weird timing oversight in the Read function. I changed some code there recently, so I might have broken something.

2. I probably have some field labeled incorrectly, or it's not refreshing the inspector like it should? For now, create in assets folder, click "ping" while your assets folder is up to go to the autoclips, and duplicate one by hand. Click "refresh database" in the STM inspector to update it.

3. THAT'S!!! a really good idea! this should probably be the default behaviour, but I wouldn't be able to have it be animated when it scrolls up like that. I'll try to figure out how to add this to the Read function, cause it really should do this. It might also be possible for me to do w/ vertex modification, since I can use that to change what vertices are visible as a mesh is being read out. For now, I could try modifying the shader to use the stencil buffer, or try the included UI Masked shader and see if that works? It's an old shader, and sorta hacky so it might not work. 

I dont think the value for the current line being shown is an exposed one, but I could be wrong? It'd be somewhere int he code near the "lineCountLimit" variable, since those need to interact. The current y position of a letter might also be useful for this?

4. If I were to add a tag that let you set an additional offset for text, would that work? Something like... <o=-1> to offset the next letter by 1 unit to the left? For now, try making a quad (Inline image) to use as a bullet point since you can set an offset for those already. That's the best quickfix I can think of. I think and indent function could be done tho, I'd just have to have the mesh remember the offset, and start new rows from there... I think it'll be doable, so I'll probably add that!

It's already pretty late here, so I'll look into this more tomorrow! Some of these things I typed are also notes to myself, so sorry this response is a little free-form!

Oh weird... but I guess a quick fix to a quick fix isn't so bad? I'm trying to think of what would even cause this to happen - the same math should be happening every time. I really want to get the shader doing all this automatically in the future, so I really hope this works for now?

(Edited 2 times)

Oh oops, you're right, it's only based upon the very first character right now!

You can see if the row is changed by seeing if position[i]'s y value is different than the previous one! The position[] array is the base position of each letter, so the y value shouldn't change unless the character drops down a row.


Give this a shot, still not sure if it's perfect though:

public void AlignToGrid(Vector3[] verts, Vector3[] middles, Vector3[] positions){
        //figure out offset of first position to grid
        int rowStart = 0;
        Vector3 posDifference = RoundDifference(positions[0]);
        for(int i=0, iL=positions.Length; i<iL; i++){
            if(positions[i].y != positions[rowStart].y){
                rowStart = i; //new row
                posDifference = RoundDifference(positions[rowStart]);
            }
            verts[4*i+0] += posDifference; //apply this offset to every vertice
            verts[4*i+1] += posDifference;
            verts[4*i+2] += posDifference;
            verts[4*i+3] += posDifference;
        }
    }
    private Vector3 RoundDifference(Vector3 original){
        Vector3 roundedPos = new Vector3(Mathf.Round(original.x), Mathf.Round(original.y), Mathf.Round(original.z));
        return original - roundedPos;
    }

Gave this a huge look-over today, the blurring in your screenshot looks like the type from the font's filter mode, so try changing that from bilinear to point? Other than that, I'm unfortunately not having much luck making this pixel snap shader work much better, yet. I know that friends who have done pixel-perfect games before usually use some combination of render textures to achieve the effect, but I'm not sure if that's compatible with Unity UI.

I also tried comparing Unity's default UI text to STM, and Unity's does seem to do pixel snapping a bit better, but still isn't perfect, either. Since the problem for you seems to be based on when the text is centered, maybe it'd be best to just align it to grid?

I've tried doing this through vertex modification (under the position foldout, check "modify vertices"), and it seems to have pretty good results? It looks about the same as the build-in text stuff, but my setup could be different. Here's the function I'm using:


public void AlignToGrid(Vector3[] verts, Vector3[] middles, Vector3[] positions){
        //figure out offset of first position to grid
        Vector3 firstPosition = positions[0];
        Vector3 roundedPos = new Vector3(Mathf.Round(firstPosition.x), Mathf.Round(firstPosition.y), Mathf.Round(firstPosition.z));
        Vector3 posDifference = firstPosition - roundedPos;
        for(int i=0, iL=verts.Length; i<iL; i++){
            verts[i] += posDifference; //apply this offset to every vertice
        }
    }

make sure the event is set to happen while the editor is running, too! I'll be adding this function to the next update, so you can see it in the sample scene, too.

I think it's gotta be... since it has an internal timer, when it's set to ignore time scale and you move out of the window, the internal timer counts up based on the delta time, the last time since the previous frame. So it keeps counting, even when the window is in the background (and the app is set to not run in the background)

This isn't the intended behaviour of ignore time scale (its for animated effects on pause menus, really) so I should either change the way STM counts up time (Use Time.time - timestarted) or make a special bool that checks whether the window is focused or not. The first option wouldn't be the best, since meshes can have variable read speeds, so I'll try the second.


Yep, got it working!! This fix will be in v1.5.2. Thanks!

Thanks for the info! I'll give it another look, but yeah there's a couple things that are just strange editor quirks. Hopefully I can find a workaround tho, this should help!