Text Mesh Pro in Custom Screen Space

I wan to build custom UI which is not based on Unity default UI. This is because Unity’s Canvas batching is VERY slow. For this purpose I need to devise a way to transform text and images from model/world space into camera/screen space. AFAIK in Unity UI “camera space” is the same as “screen space”. I want to simulate behavior of Unity camera/screen space UI using my own code.

The problem is as follows: I have Text Mesh Pro object setup with font of given size and all transforms set to zero. I want to place that object into screen space. Simulating Unity UI screen space, it should place the middle of the textbox at the bottom left corner of the screen, IIRC.

Apparently the key is to use correctly Camera.ScreenToWorldPoint call.

Is it? I wonder why it’s slow, are you doing lots of panels with moving bits or using pixel perfect option?

Pixel perfect is off. I’m drawing a wall of text in my development console. It consists of dozens of UI Text and possibly UI Image objects for icons. For pure text this console eats up 10% of my fps. With icons it’s even worse: 20%+ of fps. Icons are atlased. Since this panel is very static in screen space I think it’s batching.