{"id":377,"date":"2018-11-27T23:29:06","date_gmt":"2018-11-27T14:29:06","guid":{"rendered":"http:\/\/reasty.net\/?p=377"},"modified":"2018-11-27T23:29:06","modified_gmt":"2018-11-27T14:29:06","slug":"unity-basic-parts-5-runner2","status":"publish","type":"post","link":"https:\/\/reasty.net\/?p=377","title":{"rendered":"Unity basic parts (5) \u2013 Uni-Run(2)"},"content":{"rendered":"<p>\ub808\uc774\uc5b4\uc758 \uc21c\uc11c\ub294 Z \uac12\uc5d0\ub294 \uc601\ud5a5 \ubc1b\uc9c0 \uc54a\ub294\ub2e4.<br \/>\n\uc815\ub82c\uc21c\uc11c\ub294 Sorting Layer\ub97c \ubcc0\uacbd\ud55c\ub2e4.<\/p>\n<p>\uce74\uba54\ub77c &#8211; \ubc31\uadf8\ub77c\uc6b4\ub4dc =&gt; \uc2a4\ud3ec\uc774\ub4dc \ud234\ub85c \ubc30\uacbd \uc774\uc5b4\uc90c<\/p>\n<p>transform.Translate \/\/ \ud3c9\ud589\uc774\ub3d9 \uba54\uc11c\ub4dc : \uc624\ube0c\uc81d\ud2b8 \uc88c\ud45c\uacc4(\uc790\uae30\uc790\uc2e0\uc758)\ub85c \uc774\ub3d9\ud55c\ub2e4. \uae00\ub85c\ubc8c \uc544\ub2d8<br \/>\n\/\/ \ub450\ubc88\uc9f8 \ud30c\ub77c\ubbf8\ud130\ub294 Space.Self \uac00 \uc0dd\ub7b5\ub418\uc5b4\uc788\ub2e4. \uc774\ub3d9 \ubc29\ud5a5<\/p>\n<p>Ctrl+D : \uc624\ube0c\uc81d\ud2b8 \ubcf5\uc81c<\/p>\n<p>\uac8c\uc784\uc624\ube0c\uc81d\ud2b8\uc758 \ud06c\uae30\ub97c \ucc3e\ub294\ubc95 : Box Collider 2D \ub97c \ucd94\uac00\ud558\uc5ec Size\ub97c \ucc3e\ub294\ub2e4.<\/p>\n<p><strong>Awake()<\/strong> : Start()\uc640 \ube44\uc2b7\ud558\uc9c0\ub9cc Start() \ubcf4\ub2e4 \ud55c\ubc15\uc790 \ube60\ub974\ub2e4.<br \/>\n<strong>OnEnable<\/strong>() : \ucef4\ud3ec\ub10c\ud2b8\uac00 \ud65c\uc131\ud654\ub420\ub54c \ub9c8\ub2e4 \ub9e4\ubc88 \uc2e4\ud589\ub418\ub294 \uba54\uc11c\ub4dc<br \/>\n<strong>OnDisable<\/strong>() : \ucef4\ud3ec\ub10c\ud2b8\uac00 \ud65c\uc131\ud654\ub420\ub54c \ub9c8\ub2e4 \ub9e4\ubc88 \uc2e4\ud589\ub418\ub294 \uba54\uc11c\ub4dc<\/p>\n<pre class=\"lang:c# decode:true \" title=\"\ub9ac\uc14b\uc744 \uad6c\ud604\ud558\ub294 \uac04\ub2e8\ud55c \ubc29\ubc95 \uc911 \ud558\ub098\">void Update()\n{\n    \/\/ \uac8c\uc784 \uc624\ubc84 \uc0c1\ud0dc\uc5d0\uc11c \uac8c\uc784\uc744 \uc7ac\uc2dc\uc791\ud560 \uc218 \uc788\uac8c \ud558\ub294 \ucc98\ub9ac\n    if (isGameover &amp;&amp; Input.GetMouseButtonDown(0))\n    {\n        SceneManager.LoadScene(SceneManager.GetActiveScene().name);\n    }\n}<\/pre>\n<p>OnCollisionEnter2D(Collision2D collision)<br \/>\n<strong>collision.collider<\/strong> : \ucda9\ub3cc\ud55c \uc0c1\ub300\ubc29 collider<\/p>\n<p><strong>Anchor<\/strong> : \ubc30\uce58\uc758 \uae30\uc900\uc810. (\uae00\ub85c\ubc8c \uc88c\ud45c\uacc4).\u00a0\ud504\ub808\uc784\uc758 \uae30\uc900\uc810, \ubbfc \ub9e5\uc2a4\ub97c \ucabc\uac1c\uba74(\ub2e4\ub974\uac8c \ud558\uba74) \ub298\uc774\ub294 \uc601\uc5ed\uc744 \ub098\ud0c0\ub0b8\ub2e4 (\uc2a4\ud2b8\ub798\uce58 \ubaa8\ub4dc)<\/p>\n<p><strong>Pivot<\/strong> : \uc2a4\uc2a4\ub85c\uc758 \uae30\uc900\uc810.<\/p>\n<p>Canvas Scaling<br \/>\nCanvas Scaler : UI Scale Mode &#8211; \uace0\uc815\ud53d\uc140\ubaa8\ub4dc\/\uc2a4\ucf00\uc77c with \uc2a4\ud06c\ub9b0 \uc0ac\uc774\uc988<br \/>\nMatch : \ud654\uba74 \ube44\uac00 \ub2e4\ub97c\ub54c \uc0ac\uc6a9 : Width, Height<\/p>\n<p>Runner \uac8c\uc784 \uc18c\uc2a4<br \/>\n<a href=\"https:\/\/github.com\/reastykim\/SVVR-Uni-Run\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/reastykim\/SVVR-Uni-Run<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ub808\uc774\uc5b4\uc758 \uc21c\uc11c\ub294 Z \uac12\uc5d0\ub294 \uc601\ud5a5 \ubc1b\uc9c0 \uc54a\ub294\ub2e4. \uc815\ub82c\uc21c\uc11c\ub294 Sorting Layer\ub97c \ubcc0\uacbd\ud55c\ub2e4. \uce74\uba54\ub77c &#8211; \ubc31\uadf8\ub77c\uc6b4\ub4dc =&gt; \uc2a4\ud3ec\uc774\ub4dc \ud234\ub85c \ubc30\uacbd \uc774\uc5b4\uc90c transform.Translate \/\/ \ud3c9\ud589\uc774\ub3d9 \uba54\uc11c\ub4dc : \uc624\ube0c\uc81d\ud2b8 \uc88c\ud45c\uacc4(\uc790\uae30\uc790\uc2e0\uc758)\ub85c \uc774\ub3d9\ud55c\ub2e4. \uae00\ub85c\ubc8c \uc544\ub2d8 \/\/ \ub450\ubc88\uc9f8 \ud30c\ub77c\ubbf8\ud130\ub294 Space.Self \uac00 \uc0dd\ub7b5\ub418\uc5b4\uc788\ub2e4. \uc774\ub3d9 \ubc29\ud5a5 Ctrl+D : \uc624\ube0c\uc81d\ud2b8 \ubcf5\uc81c \uac8c\uc784\uc624\ube0c\uc81d\ud2b8\uc758 \ud06c\uae30\ub97c \ucc3e\ub294\ubc95 : Box Collider 2D \ub97c \ucd94\uac00\ud558\uc5ec Size\ub97c \ucc3e\ub294\ub2e4. Awake() : Start()\uc640 \ube44\uc2b7\ud558\uc9c0\ub9cc Start() \ubcf4\ub2e4 \ud55c\ubc15\uc790 \ube60\ub974\ub2e4&#8230;. <a href=\"https:\/\/reasty.net\/?p=377\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[9,11],"tags":[21,45],"class_list":["post-377","post","type-post","status-publish","format-standard","hentry","category-study","category-unity","tag-c","tag-unity"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/posts\/377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/reasty.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=377"}],"version-history":[{"count":0,"href":"https:\/\/reasty.net\/index.php?rest_route=\/wp\/v2\/posts\/377\/revisions"}],"wp:attachment":[{"href":"https:\/\/reasty.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reasty.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reasty.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}