{"id":13786326,"url":"https://github.com/miguel12345/UnityTextDrawer","last_synced_at":"2025-05-11T22:30:59.068Z","repository":{"id":74305828,"uuid":"97374684","full_name":"miguel12345/UnityTextDrawer","owner":"miguel12345","description":"Draw beautiful 3D texts with one line of code.","archived":false,"fork":false,"pushed_at":"2017-12-04T23:02:58.000Z","size":19586,"stargazers_count":47,"open_issues_count":0,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-17T22:36:16.826Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miguel12345.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-07-16T10:00:00.000Z","updated_at":"2024-10-16T02:39:43.000Z","dependencies_parsed_at":"2023-03-11T16:59:03.681Z","dependency_job_id":null,"html_url":"https://github.com/miguel12345/UnityTextDrawer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguel12345%2FUnityTextDrawer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguel12345%2FUnityTextDrawer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguel12345%2FUnityTextDrawer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguel12345%2FUnityTextDrawer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguel12345","download_url":"https://codeload.github.com/miguel12345/UnityTextDrawer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253645103,"owners_count":21941311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T19:01:13.798Z","updated_at":"2025-05-11T22:30:54.052Z","avatar_url":"https://github.com/miguel12345.png","language":"C#","readme":"# TextDrawer\n\nDraw beautiful 3D texts with one line of code. It's like `Graphics.DrawMesh`, but for text\n\n![](readme.gif)\n\n## Features!\n+ Supports custom fonts\n+ Supports multiple font sizes\n+ Super Fast! \n+ 0 GC alloc once the cache is filled\n+ Supports outlining, bevel, glow and all other [TextMeshPro](https://www.assetstore.unity3d.com/en/#!/content/84126) features\n+ *NEW*: Custom pivots\n  ![](text_drawer_pivot.gif)\n\n## The problem\nYou know those times when you just want to draw a text on the screen for a short duration, or you want to draw multiple similar texts, but you don't want to go through the hassle of creating/updating/removing game objecs and mono behaviours for such a simple purpose?\n\n`TextDrawer` is here to solve that!\n\n## The solution\n\n`TextDrawer` uses [TextMeshPro](https://www.assetstore.unity3d.com/en/#!/content/84126) as its backend text mesh generator, and manages an internal *LRU* cache to save the previously created meshes. When you want to draw a 3D text in the current frame, just invoke `TextDrawer.DrawText(string text,float fontSize,Color color,Matrix4x4 mat)`.\n\nNOTE: By default, TextDrawer's internal cache holds 400 items at the same time. If you are planning on drawing more than 400 different strings per frame, please increase the cache size through `TextDrawer.CacheCapacity`. \n\n## Instructions\n+ Import the `packages/UnityTextDrawer.unitypackage` to your project\n+ If you already have TextMeshPro, deselect it from the import window\n+ Add a line of code! (see example below)\n+ If you want to use custom fonts, just use `TextMeshPro`'s Create Font asset feature and pass in the resulting font asset to the draw method\n\n## Example\n\n```CSharp\npublic class TextDrawerTest : MonoBehaviour\n{\n\tpublic int ShowText;\n\t\n\tvoid Update() {\n\t\tif(ShowText) {\n\t\t\tTextDrawer.DrawText(\"Hello!\",12f,Color.white,Matrix4x4.TRS(Vector3.zero,Quaternion.Identity,Vector3.one);\n\t\t}\n\t}\n}\n\n```","funding_links":[],"categories":["Script Utility"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguel12345%2FUnityTextDrawer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguel12345%2FUnityTextDrawer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguel12345%2FUnityTextDrawer/lists"}