{"id":163,"date":"2019-05-11T00:54:48","date_gmt":"2019-05-11T00:54:48","guid":{"rendered":"https:\/\/obalfaqih.com\/blog\/?p=163"},"modified":"2020-11-02T21:45:50","modified_gmt":"2020-11-02T21:45:50","slug":"5-unity-tips-volume-2","status":"publish","type":"post","link":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/","title":{"rendered":"5 Attribute Tips &#8211; Unity Tips (Volume #2)"},"content":{"rendered":"\n<p>In this volume #2 of Unity tips, I&#8217;m gonna share with you 5 useful attributes to use in your script. (<a href=\"http:\/\/obalfaqih.com\/blog\/5-free-game-dev-tools\/\">5 Editor Tips &#8211; Unity Tips (Volume #1)<\/a>)<br>Every Tuesday, Unity developers across the globe share some useful tips about Unity. Check <a href=\"https:\/\/twitter.com\/hashtag\/unitytips\">#UnityTips<\/a> to see it yourself!<\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"ast-oembed-container \" style=\"height: 100%;\"><iframe loading=\"lazy\" title=\"5 Attributes Tips - Unity Tips (Volume #2)\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/_Egx9kG8t-c?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><\/div>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">#6 Require Component<\/h2>\n\n\n\n<p>Most of the times we use some components in our scripts.<br>You can ensure that whoever uses the script will have the components needed by using the &#8220;RequireComponent&#8221; attribute.<br>What does it do? It will add that component to the object instantly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;RequireComponent(typeof(ComponentName))]<\/code><\/pre>\n\n\n\n<blockquote class=\"twitter-tweet\" data-lang=\"en\"><p lang=\"en\" dir=\"ltr\">Unity tip of the day:<br>Using &#8220;RequireComponent&#8221; will always make sure that the object has that component if not, it will add it automatically.<br>You can watch the full video with all 5 attribute tips here: <a href=\"https:\/\/t.co\/7PaT01mRMn\">https:\/\/t.co\/7PaT01mRMn<\/a><a href=\"https:\/\/twitter.com\/hashtag\/UnityTips?src=hash&amp;ref_src=twsrc%5Etfw\">#UnityTips<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/GameDev?src=hash&amp;ref_src=twsrc%5Etfw\">#GameDev<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/Unity3D?src=hash&amp;ref_src=twsrc%5Etfw\">#Unity3D<\/a> <a href=\"https:\/\/t.co\/ww7uWnPhvC\">pic.twitter.com\/ww7uWnPhvC<\/a><\/p>\u2014 Omar Balfaqih (@OBalfaqih) <a href=\"https:\/\/twitter.com\/OBalfaqih\/status\/1095437001766199301?ref_src=twsrc%5Etfw\">February 12, 2019<\/a><\/blockquote>\n<script async=\"\" src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">#7 Add Component Menu<\/h2>\n\n\n\n<p>You can add your script to the component menu with a custom path starting from the &#8220;Component&#8221; as the root.<br>Use &#8220;AddComponentMenu&#8221; attribute.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;AddComponentMenu(\"Path\/To\/Script\")]<\/code><\/pre>\n\n\n\n<blockquote class=\"twitter-tweet\" data-lang=\"en\"><p lang=\"en\" dir=\"ltr\">Unity tip of the day:<br>You can have your own component menu to add your script.<br>To do so, use the attribute &#8220;AddComponentMenu&#8221; then pass the path (Component is the root).<br>Watch the full video with 5 Attribute Tips (<a href=\"https:\/\/twitter.com\/hashtag\/UnityTips?src=hash&amp;ref_src=twsrc%5Etfw\">#UnityTips<\/a> Volume #2):<a href=\"https:\/\/t.co\/7PaT01mRMn\">https:\/\/t.co\/7PaT01mRMn<\/a><a href=\"https:\/\/twitter.com\/hashtag\/Unity3D?src=hash&amp;ref_src=twsrc%5Etfw\">#Unity3D<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/GameDev?src=hash&amp;ref_src=twsrc%5Etfw\">#GameDev<\/a> <a href=\"https:\/\/t.co\/0ldMpvl61X\">pic.twitter.com\/0ldMpvl61X<\/a><\/p>\u2014 Omar Balfaqih (@OBalfaqih) <a href=\"https:\/\/twitter.com\/OBalfaqih\/status\/1096134062912217088?ref_src=twsrc%5Etfw\">February 14, 2019<\/a><\/blockquote>\n<script async=\"\" src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">#8 Header<\/h2>\n\n\n\n<p>To make your script user-friendly in the editor, you can add headers on top of the variables using the &#8220;Header&#8221; attribute.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Header(\"Title\")]<\/code><\/pre>\n\n\n\n<blockquote class=\"twitter-tweet\" data-lang=\"en\"><p lang=\"en\" dir=\"ltr\">Unity tip of the day:<br>You can add headers or titles to your variables.<br>Use &#8220;Header&#8221; attribute.<br>Watch the full video of 5 Attribute Tips &#8211; Unity Tips(Volume #2):<a href=\"https:\/\/t.co\/7PaT01mRMn\">https:\/\/t.co\/7PaT01mRMn<\/a><a href=\"https:\/\/twitter.com\/hashtag\/UnityTips?src=hash&amp;ref_src=twsrc%5Etfw\">#UnityTips<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/GameDev?src=hash&amp;ref_src=twsrc%5Etfw\">#GameDev<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/Unity3D?src=hash&amp;ref_src=twsrc%5Etfw\">#Unity3D<\/a> <a href=\"https:\/\/t.co\/Olcbg0WjBX\">pic.twitter.com\/Olcbg0WjBX<\/a><\/p>\u2014 Omar Balfaqih (@OBalfaqih) <a href=\"https:\/\/twitter.com\/OBalfaqih\/status\/1097514444924567556?ref_src=twsrc%5Etfw\">February 18, 2019<\/a><\/blockquote>\n<script async=\"\" src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">#9 Range<\/h2>\n\n\n\n<p>In some cases, you want the variables to stick between two values, for example, the player&#8217;s health should be between 0 and 100.<br>Luckily there&#8217;s an attribute for that which is &#8220;Range&#8221;. You have to place it on top of the affected variable.<br>It will limit the variable and provide a slider.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Range(0, 100)]\npublic float health;<\/code><\/pre>\n\n\n\n<blockquote class=\"twitter-tweet\" data-lang=\"en\"><p lang=\"en\" dir=\"ltr\">Unity tip of the day:<br>Use &#8220;Range&#8221; attribute on top of a variable to limit it with a min and max value. <br>Watch the full video of 5 Attribute Tips &#8211; Unity Tips(Volume #2):<a href=\"https:\/\/t.co\/bPRzw4Fnj9\">https:\/\/t.co\/bPRzw4Fnj9<\/a><a href=\"https:\/\/twitter.com\/hashtag\/UnityTips?src=hash&amp;ref_src=twsrc%5Etfw\">#UnityTips<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/GameDev?src=hash&amp;ref_src=twsrc%5Etfw\">#GameDev<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/Unity3D?src=hash&amp;ref_src=twsrc%5Etfw\">#Unity3D<\/a> <a href=\"https:\/\/t.co\/H9EIhJdEXN\">pic.twitter.com\/H9EIhJdEXN<\/a><\/p>\u2014 Omar Balfaqih (@OBalfaqih) <a href=\"https:\/\/twitter.com\/OBalfaqih\/status\/1097816353828995072?ref_src=twsrc%5Etfw\">February 19, 2019<\/a><\/blockquote>\n<script async=\"\" src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\"\/>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">#10 Context Menu<\/h2>\n\n\n\n<p>You can call a function in the editor (runtime too) and accessing it through the gear icon of the current script by using the &#8220;ContextMenu&#8221;.<br>Simply, pass the ContextMenu along with the title on top of the desired function to be called.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;ContextMenu(\"Say Hello!\")]\npublic void Hello(){\n  print(\"Hello!\");\n}<\/code><\/pre>\n\n\n\n<blockquote class=\"twitter-tweet\" data-lang=\"en\"><p lang=\"en\" dir=\"ltr\">If you want to use or test a function in the editor, use the &#8220;ContextMenu&#8221; attribute on top of the method you want to call.<br>You&#8217;ll find it under the gear icon\ud83d\udc4c\ud83c\udffb<br>Watch the full video of 5 Attribute Tips &#8211; Unity Tips(Volume #2):<a href=\"https:\/\/t.co\/bPRzw4Fnj9\">https:\/\/t.co\/bPRzw4Fnj9<\/a><a href=\"https:\/\/twitter.com\/hashtag\/UnityTips?src=hash&amp;ref_src=twsrc%5Etfw\">#UnityTips<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/unity3d?src=hash&amp;ref_src=twsrc%5Etfw\">#unity3d<\/a> <a href=\"https:\/\/twitter.com\/hashtag\/gamedev?src=hash&amp;ref_src=twsrc%5Etfw\">#gamedev<\/a> <a href=\"https:\/\/t.co\/DNqEHMqek6\">pic.twitter.com\/DNqEHMqek6<\/a><\/p>\u2014 Omar Balfaqih (@OBalfaqih) <a href=\"https:\/\/twitter.com\/OBalfaqih\/status\/1097858714537811970?ref_src=twsrc%5Etfw\">February 19, 2019<\/a><\/blockquote>\n<script async=\"\" src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Share Your Tips!<\/h2>\n\n\n\n<p>Which one of the above is your favorite?<br>If you got other ones, share them in the comments below and on Twitter using #UnityTips.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this volume #2 of Unity tips, I&#8217;m gonna share with you 5 useful attributes to use in your script. (5 Editor Tips &#8211; Unity Tips (Volume #1))Every Tuesday, Unity developers across the globe share some useful tips about Unity. Check #UnityTips to see it yourself! #6 Require Component Most of the times we use [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":174,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[10],"tags":[],"class_list":["post-163","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-game-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>5 Attribute Tips - Unity Tips (Volume #2) | Omar Balfaqih<\/title>\n<meta name=\"description\" content=\"In this volume #2 of Unity tips, I&#039;m gonna share with you 5 useful attributes to use in your script. Every Tuesday devs uses #UnityTips to share their tips.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"5 Attribute Tips - Unity Tips (Volume #2) | Omar Balfaqih\" \/>\n<meta property=\"og:description\" content=\"In this volume #2 of Unity tips, I&#039;m gonna share with you 5 useful attributes to use in your script. Every Tuesday devs uses #UnityTips to share their tips.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Omar Balfaqih\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/obalfaqih\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-11T00:54:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-11-02T21:45:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/obalfaqih.com\/blog\/wp-content\/uploads\/2019\/05\/UnityTips-1-new.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Omar Balfaqih\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@obalfaqih\" \/>\n<meta name=\"twitter:site\" content=\"@obalfaqih\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Omar Balfaqih\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/\"},\"author\":{\"name\":\"Omar Balfaqih\",\"@id\":\"https:\/\/obalfaqih.com\/blog\/#\/schema\/person\/ea7f5dd9653f5ee0f1c0859870c9fb94\"},\"headline\":\"5 Attribute Tips &#8211; Unity Tips (Volume #2)\",\"datePublished\":\"2019-05-11T00:54:48+00:00\",\"dateModified\":\"2020-11-02T21:45:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/\"},\"wordCount\":543,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/obalfaqih.com\/blog\/wp-content\/uploads\/2019\/05\/UnityTips-1-new.jpg\",\"articleSection\":[\"Game Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/\",\"url\":\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/\",\"name\":\"5 Attribute Tips - Unity Tips (Volume #2) | Omar Balfaqih\",\"isPartOf\":{\"@id\":\"https:\/\/obalfaqih.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/obalfaqih.com\/blog\/wp-content\/uploads\/2019\/05\/UnityTips-1-new.jpg\",\"datePublished\":\"2019-05-11T00:54:48+00:00\",\"dateModified\":\"2020-11-02T21:45:50+00:00\",\"author\":{\"@id\":\"https:\/\/obalfaqih.com\/blog\/#\/schema\/person\/ea7f5dd9653f5ee0f1c0859870c9fb94\"},\"description\":\"In this volume #2 of Unity tips, I'm gonna share with you 5 useful attributes to use in your script. Every Tuesday devs uses #UnityTips to share their tips.\",\"breadcrumb\":{\"@id\":\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#primaryimage\",\"url\":\"https:\/\/obalfaqih.com\/blog\/wp-content\/uploads\/2019\/05\/UnityTips-1-new.jpg\",\"contentUrl\":\"https:\/\/obalfaqih.com\/blog\/wp-content\/uploads\/2019\/05\/UnityTips-1-new.jpg\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/obalfaqih.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"5 Attribute Tips &#8211; Unity Tips (Volume #2)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/obalfaqih.com\/blog\/#website\",\"url\":\"https:\/\/obalfaqih.com\/blog\/\",\"name\":\"Omar Balfaqih\",\"description\":\"Game Development, Filming &amp; Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/obalfaqih.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/obalfaqih.com\/blog\/#\/schema\/person\/ea7f5dd9653f5ee0f1c0859870c9fb94\",\"name\":\"Omar Balfaqih\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/obalfaqih.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/bc0eed4ceaee7dba8e89990010841754ddc8d69a19aec06dfadbd9a5f12ef553?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/bc0eed4ceaee7dba8e89990010841754ddc8d69a19aec06dfadbd9a5f12ef553?s=96&d=mm&r=g\",\"caption\":\"Omar Balfaqih\"},\"sameAs\":[\"http:\/\/obalfaqih.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"5 Attribute Tips - Unity Tips (Volume #2) | Omar Balfaqih","description":"In this volume #2 of Unity tips, I'm gonna share with you 5 useful attributes to use in your script. Every Tuesday devs uses #UnityTips to share their tips.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/","og_locale":"en_US","og_type":"article","og_title":"5 Attribute Tips - Unity Tips (Volume #2) | Omar Balfaqih","og_description":"In this volume #2 of Unity tips, I'm gonna share with you 5 useful attributes to use in your script. Every Tuesday devs uses #UnityTips to share their tips.","og_url":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/","og_site_name":"Omar Balfaqih","article_publisher":"https:\/\/facebook.com\/obalfaqih","article_published_time":"2019-05-11T00:54:48+00:00","article_modified_time":"2020-11-02T21:45:50+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/obalfaqih.com\/blog\/wp-content\/uploads\/2019\/05\/UnityTips-1-new.jpg","type":"image\/jpeg"}],"author":"Omar Balfaqih","twitter_card":"summary_large_image","twitter_creator":"@obalfaqih","twitter_site":"@obalfaqih","twitter_misc":{"Written by":"Omar Balfaqih","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#article","isPartOf":{"@id":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/"},"author":{"name":"Omar Balfaqih","@id":"https:\/\/obalfaqih.com\/blog\/#\/schema\/person\/ea7f5dd9653f5ee0f1c0859870c9fb94"},"headline":"5 Attribute Tips &#8211; Unity Tips (Volume #2)","datePublished":"2019-05-11T00:54:48+00:00","dateModified":"2020-11-02T21:45:50+00:00","mainEntityOfPage":{"@id":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/"},"wordCount":543,"commentCount":0,"image":{"@id":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#primaryimage"},"thumbnailUrl":"https:\/\/obalfaqih.com\/blog\/wp-content\/uploads\/2019\/05\/UnityTips-1-new.jpg","articleSection":["Game Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/","url":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/","name":"5 Attribute Tips - Unity Tips (Volume #2) | Omar Balfaqih","isPartOf":{"@id":"https:\/\/obalfaqih.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#primaryimage"},"image":{"@id":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#primaryimage"},"thumbnailUrl":"https:\/\/obalfaqih.com\/blog\/wp-content\/uploads\/2019\/05\/UnityTips-1-new.jpg","datePublished":"2019-05-11T00:54:48+00:00","dateModified":"2020-11-02T21:45:50+00:00","author":{"@id":"https:\/\/obalfaqih.com\/blog\/#\/schema\/person\/ea7f5dd9653f5ee0f1c0859870c9fb94"},"description":"In this volume #2 of Unity tips, I'm gonna share with you 5 useful attributes to use in your script. Every Tuesday devs uses #UnityTips to share their tips.","breadcrumb":{"@id":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#primaryimage","url":"https:\/\/obalfaqih.com\/blog\/wp-content\/uploads\/2019\/05\/UnityTips-1-new.jpg","contentUrl":"https:\/\/obalfaqih.com\/blog\/wp-content\/uploads\/2019\/05\/UnityTips-1-new.jpg","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/obalfaqih.com\/blog\/5-unity-tips-volume-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/obalfaqih.com\/blog\/"},{"@type":"ListItem","position":2,"name":"5 Attribute Tips &#8211; Unity Tips (Volume #2)"}]},{"@type":"WebSite","@id":"https:\/\/obalfaqih.com\/blog\/#website","url":"https:\/\/obalfaqih.com\/blog\/","name":"Omar Balfaqih","description":"Game Development, Filming &amp; Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/obalfaqih.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/obalfaqih.com\/blog\/#\/schema\/person\/ea7f5dd9653f5ee0f1c0859870c9fb94","name":"Omar Balfaqih","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/obalfaqih.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/bc0eed4ceaee7dba8e89990010841754ddc8d69a19aec06dfadbd9a5f12ef553?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bc0eed4ceaee7dba8e89990010841754ddc8d69a19aec06dfadbd9a5f12ef553?s=96&d=mm&r=g","caption":"Omar Balfaqih"},"sameAs":["http:\/\/obalfaqih.com"]}]}},"jetpack_featured_media_url":"https:\/\/obalfaqih.com\/blog\/wp-content\/uploads\/2019\/05\/UnityTips-1-new.jpg","_links":{"self":[{"href":"https:\/\/obalfaqih.com\/blog\/wp-json\/wp\/v2\/posts\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/obalfaqih.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/obalfaqih.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/obalfaqih.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/obalfaqih.com\/blog\/wp-json\/wp\/v2\/comments?post=163"}],"version-history":[{"count":2,"href":"https:\/\/obalfaqih.com\/blog\/wp-json\/wp\/v2\/posts\/163\/revisions"}],"predecessor-version":[{"id":175,"href":"https:\/\/obalfaqih.com\/blog\/wp-json\/wp\/v2\/posts\/163\/revisions\/175"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/obalfaqih.com\/blog\/wp-json\/wp\/v2\/media\/174"}],"wp:attachment":[{"href":"https:\/\/obalfaqih.com\/blog\/wp-json\/wp\/v2\/media?parent=163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/obalfaqih.com\/blog\/wp-json\/wp\/v2\/categories?post=163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/obalfaqih.com\/blog\/wp-json\/wp\/v2\/tags?post=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}