Just what I needed! This would be epic to get going in FoundryVTT
AnthonyUccello
Recent community posts
I deleted the Clavian folder and reimported and its working.
My next question is, why do I need to manually re-create quads. When I make changes to the quads on an prefab, the changes are not noticed and doesn't get committed to github. Do you know why version control does not detect changes to the quad data?
There were no duplicates in that folder but I deleted the New Quad 1-6 that was there.
Whenever I click refresh database I get this error:
[Exception] ArgumentException: An item with the same key has already been added. Key: New Quad 2
Is there somewhere else I can clear out the database?
I searched my project for New Quad 2 and it doesnt exist.
Hello
I setup my unity project on a new computer and for some reason I can no longer see quads. The first time I opened the app, I could see quads and I was able to edit them. Ever since, whenever I open the project and try to edit the SuperText quads component nothing is visible.
When I try to add a quad nothing happens as you can see (where as obviously a new quad should appear)
I do get an error:
[Exception] ArgumentException: An item with the same key has already been added. Key: New Quad 3
Heres a stack trace
This is a rather critical blocker so any advice or help is appreciated.
Also, one other thing I have noticed is edits to quad data do not seem to get noticed by version control. Whenever I do a new project checkout, I have to manually edit the SuperTextMesh component quads section and add back each quad. I wonder if there is a serialization bug?
The issue we were having is we have a sprite mask and it didnt seem to work with the mask. However we used this Stencil buffer setting and it seems to have worked: https://gamedev.stackexchange.com/questions/176170/how-to-use-a-sprite-mask-or-shader-to-mask-a-text
I have absolutely no idea what this does or why it works. But it seems to for now...
We have cards which have text and they are inside a scrollview. The parent has a sprite mask and it works for the images but not the text. I tried having both a SpriteMask and a Mask but that didnt work. If I have JUST a mask it does seem to mask the text but given that we need this to work with a SpriteMask (or in addition to a Sprite Mask) I am currently confused as what a next step could be...
Oh ya it totally worked and it was painless!
I just added some quads on the text ("sprite1", "sprite2" etc). Then I do this:
// Replace "sx" tags with appropriate Super Text Mesh Quad tags
for (int i = 1; i < actionEffectState.numberOfPhases; i++)
{
// There will be 6 sprite quads named sprite 1-6 on the Super Text Mesh and this replaces sX with quad spriteX
_descriptionText.text = _descriptionText.text.Replace("s" + i, "<quad=sprite" + i + ">");
_descriptionText.data.quads["sprite" + i].texture = effectModel.fullViewSprites[i - 1].texture;
}
Easy peasy!
Thank you for the help! This was a lot less complicated than I thought it was going to be haha!
First off thank you thats very helpful information (espcially pressing that T button as I was unaware that was even a toggle).
As for my setup this approach posses a serious problem and this is a rather large deal. We specifically got Super Text Mesh so we can put sprites in our text as we are making a card game.
The problem is I need a way of doing this dynamically and without having to use a sprite sheet.
The way the game we works is we have a Card game object and one of the children is a Super Text Mesh object. There is also an attached CardModel object which has a list of Sprites that go in the description. These are indvidual sprites and are not in a sprite sheet. There are also literally hundreds so using indexes and putting them all into a sprite sheet would be a nightmare.
Is there a way to do this dynamically and do it passing in sprites at runtime?
Hello
I am trying to place an image inline with the text but I looked at the sample scene and I did not see an example and after reading the Quad documentation a few times I am still struggling to understand what I need to do.
I have an array of sprites that I need to display inline in the text. Can you provide an example of how I would write the tags to add images from an array?
This is a scriptable object and the array with sprites is a property and ideally I can reference an index in the array to grab the sprite.
Please advise how this can be done thank you!
Hello
After updating I am getting an error when I try to do certain editor functions:
[Error] The name 'validateAppearance' does not exist in the current context
I believe its because of this code:
#if UNITY_EDITOR //just for updating when the editor changes
internal bool validateAppearance = false;
#endif
public void OnValidate() {
if(font != null && !font.dynamic)
{
if(font.fontSize > 0){
quality = font.fontSize;
}else{
Debug.Log("You're probably using a custom font! \n Unity's got a bug where custom fonts have their size set to 0 by default and there's no way to change that! So to avoid this error, here's a solution: \n * Drag any font into Unity. Set it to be 'Unicode' or 'ASCII' in the inspector, depending on the characters you want your font to have. \n * Set 'Font Size' to whatever size you want 'quality' to be locked at. \n * Click the gear in the corner of the inspector and 'Create Editable Copy'. \n * Now, under the array of 'Character Rects', change size to 0 to clear everything. \n * Now you have a brand new font to edit that has a font size that's not zero! Yeah!");
}
//quality = UseThisFont.fontSize == 0 ? 64 : UseThisFont.fontSize; //for getting around fonts with a default size of 0.
//Debug.Log("Font size is..." + UseThisFont.fontSize);
style = FontStyle.Normal;
}
//apply automatic quality
if(autoQuality)
{
quality = (int)Mathf.Ceil(size);
}
if(size < 0f){size = 0f;}
if(readDelay < 0f){readDelay = 0f;}
if(autoWrap < 0f){autoWrap = 0f;}
if(verticalLimit < 0f){verticalLimit = 0f;}
if(minPitch > maxPitch){minPitch = maxPitch;}
if(maxPitch < minPitch){maxPitch = minPitch;}
if(speedReadScale < 0.01f){speedReadScale = 0.01f;}
/*
if(validateMesh)
{
#if UNITY_EDITOR
validateAppearance = true;
#endif
}
*/
validateAppearance = true;
}
You have code which declares a validateAppearance only in editor but are using it regardless. I think the validateAppearance needs wrapping like this:
#if UNITY_EDITOR
validateAppearance = true;
#endif
When I did this it fixed the issue.
Ok That got it working thanks. Is there a way to preview these animations? I currently can only see them at run time.
As a side question, are there any plugins that work with Super Text Mesh that focus on Animations? E.g. TextFX does text animations but they use special TextFX objects. Im looking for a way to do more robust animations on text after its already drawn so if you have any suggestions I would love to know.
Hello
I am just getting started but I am confused as to what I am not understanding. When I look at the same scene, I see a Super Text Mesh object which has the following:
But when I create one, I am missing a lot of these fields, including Draw Anim Name
Can you suggest what I am not understanding and how I can create a Super Text Mesh which lets me specify the Draw Anim Name?