I’m inclined to say you might get a better result using \begin{array} or \begin{tabular} because you can customize its alignment in every column.
Thanks. Tabular was just the thing I needed.
I’m trying to implement an augmented matrix. I’m basically there. I just have a padding issue with the matrix brackets. Any ideas?
Edit: Also, adding color to the text creates two issues. First, the border between the third and fourth columns disappears (I even removed the brackets to make sure the border wasn’t just rendering in the same spot as the brackets). Second, the alignment in the rows is a little off (most noticeable in the bottom row).
Since Unity won’t let me attach more than 5 images in one message:
I also have an issue with needing more vertical space between lines. I’ve tried using just an extra newline with \ and \vskip. Both result in an extra border artifact (see the blank space between the lines where the third column starts).
Edit: I found the secret sauce to get the row and column spacing I want while still having colors and the vertical line without artifacts. For anyone who has this issue in the future:
The only remaining issue from my previous two posts, is that matrices do not properly encapsulate a tabular block. The brackets, parentheses, or curly brackets will be embedded in the tabular block. I’ve also tried using choose instead of matrix, but got the same results.
I’ve also found matrices do not properly respect \vskip. The spacing between multiple lines is inconsistent. In my case, I tried three text lines with a \vskip{20} between lines 1-2 and 2-3. The spacing between lines 1-2 was considerably smaller than between lines 2-3 (to the point the spacing between lines 1-2 was barely larger than the normal spacing between lines). The result was the same regardless of what size I fed to \vskip.
Sorry just noticed for replies.
First, I don’t think tabular inside bmatrix is the correct way. You have to use like \left{\begin{tabular}…\end{tabular}\right}. Also, I actually surprised that tabular can be arranged like that since tabular vs array, the difference is that “array” is inline and “tabular” is block. Block means they have should have their own dedicated line section and not “inlined” with any elements.
I’ll look for more details when I have chance to open Unity.
Thanks for the reply. Unfortunately, I already tried \left and \right both with and without choose (\begin{choose}\left[ … \right]\end{choose}) and (\left[ … \right]). Both methods produce the same results as the matrices (bmatrix, etc).
That said, you’re right about switching to array. It solves both of my remaining problems, so everything appears to be working as I want them to- the matrix brackets are outside of the array, colors are fine, column divider is fine, and no spacing issues (row or column). My augmented matrix is good to go. Thanks!
Hi, WillNode!
I’ve recently found a bug where I can’t get a TEXDraw element in TMP mode to go fully transparent. Almost all letters will disappear expect for horizontal lines.
If I include a square root, the horizontal line will not fade completely either.
I can get it to go fully transparent if I set the Material itself to transparent though, but that’s not very practical since it will affect all the texts using that material.
Thank you in advance!
hey guys
I am migrating a project from Unity 2022.3.6f1 to 6000.0.2f1, and I have issues with TEXDrawUE.
I got the following error:
NullReferenceException: Object reference not set to an instance of an object
TexDrawLib.TEXDrawUE…ctor
The reason is following the code
public TEXDrawUE(string text)
{
AddToClassList(ussClassName);
// Register a callback to generate the visual content of the control.
generateVisualContent += context => GenerateVisualContent(context);
m_orchestrator = new TexOrchestrator();
m_Text = text;
// This special call is behind internal gate... (Facepalm)
MethodInfo allocateHandler = typeof(MeshGenerationContext).GetMethod("Allocate",
BindingFlags.NonPublic | BindingFlags.Instance);
Debug.Assert(allocateHandler != null);
// internal MeshWriteData Allocate(int vertexCount, int indexCount, Texture texture, Material material, MeshFlags flags)
allocateFun = (System.Func<MeshGenerationContext, int, int, Texture, Material, int, MeshWriteData>)
allocateHandler.CreateDelegate(typeof(System.Func<MeshGenerationContext, int, int, Texture, Material, int, MeshWriteData>));
}
Unity changed the MeshGenerationContext API in 2023.2 and also made the reflection code irrelevant.
Do you have any recommendations on how to make TEXDrawUE work?
@Alexander_Kuzmichev I ran into the same error, turns out the “Allocate” method is now public, just with different arguments.
You can thus remove the whole block between lines 10 and 16 in your snippet above, then change
var w = allocateFun(context, v.m_Positions.Count, v.m_Indicies.Count, f.Texture(), mat, 0);
to
var w = context.Allocate(v.m_Positions.Count, v.m_Indicies.Count, f.Texture());
in DrawMeshes.
I found that without mat
colors doesn’t work
Hello!
I am starting a project in Unity 2022.3.42f1 and installed TEXDraw 7.0.1. When adding a TEXDraw 3D object into the scene, I get this MissingReferenceException:
Any ideas on what the issue is? Thank you in advance!
I have an issue with fractions in TexDrawUE.
The fraction line is not shown - is there a solution for this?
Another interesting behaviour:
numbers and letters are only shown both if the both appear in numerator and denominator
adding a letter in the other part makes all letters been shown (in math mode)
Removing the number from numerator cancels also the display of numbers in the denominator
Hello Wildan! I’ve been a customer of yours for several years now, using TEXDraw extensively for k-12 educational games. I’m trying to implement TEXLink into our projects and have diagnosed that it depends upon Unity’s legacy UnityEngine.Input class for input polling, but I’m using the new input system. Are there any plans to support the new input system? I’d like to know before I do my own dirty hack/patch.
EDIT: My apologies: I see that there is InputSystem support, which has to be toggled from the Tools Menu. However I am unable to toggle this on, when ever I select “Enable InputSystem Integration” a pop-up says I am reverting to the legacy Input Manager.
Hi, how to put a dot above a character? Like, see screenshot of desired effect. I tried things like: “\dot a”, '\dot{a}", “\dot{\omega}” “\dot \omega”, but none of these worked for me.
Along similar lines, I’m trying a workaround of using ’ to denote the derivative instead, however this renders as a tear drop shape quotation mark, see first screenshot. I tried using both “'” and “\text{'}”, but both render as the teardrop shape quotation mark. How to make this render as it appears in these forums? (second screenshot).
Hmmm, just noticed that no posts by @WillNode since Feb, and no posts in the forums at all since April