Author Topic: Possible to use UILabel (no Panel) instead of TextMesh on in game 3D-objects?  (Read 2464 times)

ett.ufo

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Is there any way to use UILabels without a UIPanel for ingame texts instead of a normal TextMesh?
I'm doing a math game and have text on moving 3d-objects.

Since I have already created a custom font used in the GUI I would like to reuse it in the game.
If I place UILabels w panel on 3d-gameobjects they wont be batched since they belong to different panels and the draw call number will rise. And since they are plentiful the UIpanel scripting overhead is also a bit to high.

I'm having a hard time recreating the font (with a good looking result) with Unitys horrible custom font support.

I know this is not really the intended use of NGUI, but it would make my day...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
UIPanel is what draws widgets. You can't have widgets without it. This is like asking if it's possible to put a Mesh into your world without a Renderer to draw it.

You can put NGUI widgets into your world just fine as long as they are children of a UIPanel. UIPanel doesn't need to be under UIRoot. It can be on any game object.