hello l am have question

Avatar
  • updated

l am have same qustion 

l am I have always used aline But he couldn't satisfy me with a few questions.

now l am want use for  shapes 

1. Can I change the font?

2.There may be a large number of health deduction numbers on the same screen, about 500 to 1000 data displayed on the screen, so how is the performance?

Because I use shapes to display the blood loss number when the monster loses blood.

Another question, are there more examples?
I feel like there are too few examples now, and there are some things I don't quite understand.
I also want to use shapes for the scanning of releasing skills

I didn't find any information on how to draw screen coordinates, or more examples about skill scanning.

Reporting a bug? please specify Unity version:
unity 2022.3.23
Reporting a bug? please specify Shapes version:
4.3.1
Reporting a bug? please specify Render Pipeline:
URP
Avatar
Freya Holmér creator
  1. In immediate mode drawing, you can set Draw.Font to change the font, which you can set to any TextMeshPro font assets (TMP_FontAsset)
  2. it's hard to tell what the performance will be like, because it depends a lot on your target device and to some extent how you implement it! 500 to 1000 text elements is quite a lot though, and this is something that might require a custom solution unfortunately. It might work, but, I would try it first as a test case to see if it works, before implementing it proper in your actual project. There are some things to be aware of when it comes to performance and drawing text in particular. There's more info in the documentation under Drawing Text here
  3. Right now there aren't a lot of examples out there. I do remember seeing a website where someone put up a lot of examples though, with a grid of many pretty animations with code and all, I remember it was in Chinese, but I haven't been able to find it since :(
  4. I'm not entirely sure what you mean by skill scanning. Do you mean the little spinner that MMO/MOBA games use for skills/actions in the UI hotbar? If so, you should be able to use a disc component with an angular gradient. though the tricky part will be to mask it using the stencil buffer settings exposed by Shapes
  5. Shapes isn't really designed to be used in UI canvases, but there is an experimental component for drawing Shapes in a canvas, see the changelog here for 4.3.0 for more info! but, that said, it is possible to draw in screen space, see this thread!

Avatar
zheng

Image 836

l am draw 1000 number fps for 98.5 it is very bad .so where l am dowering ?

Image 837

Avatar
zheng

it batches and setpass calls no reduce

Avatar
Freya Holmér creator

That's the old/slow way of drawing text! you'll want to use TextElement as mentioned in the documentation here