浏览代码

fix text in scene view

/main
fzhangtj 6 年前
当前提交
e20c8628
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12
      Assets/UIWidgets/ui/painting/canvas_impl.cs

12
Assets/UIWidgets/ui/painting/canvas_impl.cs


var font = FontManager.instance.getOrCreate(textBlob.style.fontFamily, textBlob.style.UnityFontSize);
prepareGL(font.material);
font.material.SetPass(0);
Matrix4x4 cameraMat = Matrix4x4.identity;
if (Camera.current != null) // draw mesh will use camera matrix, set to identity before draw mesh
{
cameraMat = Camera.current.worldToCameraMatrix;
Camera.current.worldToCameraMatrix = Matrix4x4.identity;;
}
if (Camera.current != null)
{
Camera.current.worldToCameraMatrix = cameraMat;
}
}
private void pushClipRect(Rect clipRect, Matrix4x4 transform) {

正在加载...
取消
保存