- Home /
Writing maths expressions
Hi I am currently needing to go beyond maths expressions requiring just simple indices to be displayed and instead roots, fractions and formulas. Has anyone found an efficient way of doing this? An example: 1/4^5 as a fraction or 1/square.root:4^5 - but both of course written as proper fractions with square root symbols displayed.
TextMeshPro has inbuilt indices functionality but that's it as far as I've found it goes in markup docs. I've found the only option so far to be: https://www.assetstore.unity3d.com/en/#!/content/51426 Anyone had success without purchasing assets?
Answer by Bunny83 · Nov 04, 2017 at 07:49 PM
Properly rendering any sort of mathematical expression is extremely complex. The required space has be grow in both directions. If you look at the sample images on the asset you've found you know what i mean. The asset looks solid. As it's already optimised for Unity you can't get any better than this.
I've seen much simpler assets for much more money. Not that i would buy it ^^. If i was in need of something like that i would probably roll my own renderer. However this would take hours to get right. It's always a matter of if you are able to do it yourself and if you're willing to spend the time. If it's a pure time / money consideration you are better off with the asset
You're right, it integrates with Text$$anonymous$$eshPro too so is ideal I just didn't want to find out something new tomorrow. Thanks for your thoughtful response it's helped and I'll stop looking for other solutions and just invest.