{"id":69,"date":"2021-02-09T22:35:27","date_gmt":"2021-02-09T22:35:27","guid":{"rendered":"https:\/\/therenaissanceraven.com\/?p=69"},"modified":"2021-02-14T20:39:53","modified_gmt":"2021-02-14T20:39:53","slug":"unity-adding-text-above-game-objects-without-canvas","status":"publish","type":"post","link":"https:\/\/therenaissanceraven.com\/?p=69","title":{"rendered":"Unity &#8211; Adding text above game objects without canvas"},"content":{"rendered":"<p>Canvas work great for UI interactions, however, when we are trying to draw 10&#8217;s or 100&#8217;s of canvas performance is tanked, thus here is a canvas free method to add text above game objects, e.g. a health display above a monster.<\/p>\n<p>To view a video tutorial of this, please see the video below:<\/p>\n<p><iframe loading=\"lazy\" title=\"Unity Tutorial  - Dynamic Text Box above Game Objects\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/_K1vsWpM-zQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>The flow chart or logic of this method is show below:<\/p>\n<div style=\"clear: both; text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-103 size-full\" src=\"https:\/\/therenaissanceraven.com\/wp-content\/uploads\/2021\/01\/Flowchart-2B-2BUnity-2Btext-2Bboxes-2Bwithout-2Bcanvas.png\" alt=\"\" width=\"1024\" height=\"424\" srcset=\"https:\/\/therenaissanceraven.com\/wp-content\/uploads\/2021\/01\/Flowchart-2B-2BUnity-2Btext-2Bboxes-2Bwithout-2Bcanvas.png 1024w, https:\/\/therenaissanceraven.com\/wp-content\/uploads\/2021\/01\/Flowchart-2B-2BUnity-2Btext-2Bboxes-2Bwithout-2Bcanvas-300x124.png 300w, https:\/\/therenaissanceraven.com\/wp-content\/uploads\/2021\/01\/Flowchart-2B-2BUnity-2Btext-2Bboxes-2Bwithout-2Bcanvas-768x318.png 768w, https:\/\/therenaissanceraven.com\/wp-content\/uploads\/2021\/01\/Flowchart-2B-2BUnity-2Btext-2Bboxes-2Bwithout-2Bcanvas-850x352.png 850w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div>\n<div>In essence, the health text is a child game object above your game object that is controlled via a script.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Canvas work great for UI interactions, however, when we are trying to draw 10&#8217;s or 100&#8217;s of canvas performance is tanked, thus here is a canvas free method to add text above game objects, e.g. a health display above a monster. To view a video tutorial of this, please see the video below: The flow&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/therenaissanceraven.com\/index.php?rest_route=\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/therenaissanceraven.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/therenaissanceraven.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/therenaissanceraven.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/therenaissanceraven.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=69"}],"version-history":[{"count":5,"href":"https:\/\/therenaissanceraven.com\/index.php?rest_route=\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":180,"href":"https:\/\/therenaissanceraven.com\/index.php?rest_route=\/wp\/v2\/posts\/69\/revisions\/180"}],"wp:attachment":[{"href":"https:\/\/therenaissanceraven.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/therenaissanceraven.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/therenaissanceraven.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}