{"id":5466,"date":"2017-02-21T10:00:45","date_gmt":"2017-02-21T01:00:45","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=5466"},"modified":"2017-02-20T19:56:40","modified_gmt":"2017-02-20T10:56:40","slug":"unity%e3%81%ae%e5%ad%a6%e7%bf%92-part6","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/5466","title":{"rendered":"Unity\u306e\u5b66\u7fd2 part6"},"content":{"rendered":"<p>\u4eca\u56de\u306f\u3001\u30e2\u30c7\u30eb\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059<\/p>\n<p>\u3061\u306a\u307f\u306b\u30ed\u30fc\u30c9\u30de\u30c3\u30d7\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u304a\u308a\u307e\u3059<\/p>\n<p>\u30e2\u30c7\u30eb\u3092\u4f7f\u7528\u3057\u305f\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u30ed\u30fc\u30c9\u30de\u30c3\u30d7<br \/>\n1. <a href=\"\/appnews\/archives\/5424\">\u30e2\u30c7\u30eb\u306e\u53d6\u5f97\u3068\u914d\u7f6e\u3000<\/a><br \/>\n2. \u30e2\u30c7\u30eb\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a\u3000<span style=\"color: #7f270a;\">\u2190\u4eca\u56de\u306e\u8a18\u4e8b<\/span><br \/>\n3. \u30e2\u30c7\u30eb\u306e\u79fb\u52d5\u306b\u5408\u308f\u305b\u305f\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a<br \/>\n4. \u30e2\u30c7\u30eb\u3092\u8ffd\u5c3e\u3059\u308b\u30ab\u30e1\u30e9\u306e\u8a2d\u5b9a<\/p>\n<p>\u76ee\u6a19\u306f\u3001\u30e2\u30c7\u30eb\u306e\u52d5\u304b\u3057\u65b9\u3001\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a\u3001\u30ab\u30e1\u30e9\u306e\u5411\u304d\u306b\u5408\u308f\u305b\u305f\u79fb\u52d5\u306e\u4ed5\u65b9\u3092\u5b66\u7fd2\u3059\u308b\u3053\u3068\u3067\u3059<br \/>\n<!--more--><\/p>\n<h3>\u30e2\u30c7\u30eb\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u8a2d\u5b9a<\/h3>\n<p>Project\u30d5\u30a9\u30eb\u30c0\u306bAnimator Controller\u3092\u4f5c\u6210\u3057\u307e\u3059<br \/>\n\u3084\u308a\u65b9\u306fProject\u306e\u30bf\u30d6\u5185\u3067\u53f3\u30af\u30ea\u30c3\u30af\u3092\u3057\u3066 Create &gt; Animator Controller\u3067\u3059<br \/>\n\u4f5c\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u540d\u306f\u597d\u304d\u306a\u540d\u524d\u3067\u826f\u3044\u306e\u3067\u3001\u9069\u5f53\u306b\u4ed8\u3051\u3066\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u307e\u3059<br \/>\n\u3059\u308b\u3068Animator\u306e\u7de8\u96c6\u753b\u9762\u3078\u9077\u79fb\u3057\u307e\u3059<br \/>\n<img loading=\"lazy\" class=\"alignnone size-medium wp-image-5467\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/animator_init-300x233.png\" alt=\"animator_init\" width=\"600\" height=\"466\" srcset=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/animator_init-300x233.png 300w, https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/animator_init.png 1280w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u306a\u305c\u304b\u521d\u671f\u753b\u9762\u3067\u306f\u3001Any State\u3068Entry\u304c\u534a\u5206\u898b\u5207\u308c\u3066\u3044\u308b\u306e\u3067\u3001D&amp;D\u3067\u898b\u3048\u308b\u4f4d\u7f6e\u306b\u6301\u3063\u3066\u304d\u307e\u3059<br \/>\nEntry\u3068\u8a00\u3046\u306e\u306f\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u8a2d\u7f6e\u3055\u308c\u305f\u6642\u304b\u3089\u59cb\u307e\u308b\u72b6\u614b\u3067\u3059<br \/>\n\u958b\u59cb\u6642\u306b\u306f\u3001\u5f85\u3061\u306e\u30dd\u30fc\u30ba\u3092\u3057\u3066\u307b\u3057\u3044\u306e\u3067\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059<br \/>\nAnimator\u30bf\u30d6\u5185\u306e\u9069\u5f53\u306a\u3068\u3053\u308d\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001CreateState &gt; Empty\u3067\u7a7a\u306e\u72b6\u614b\u3092\u4f5c\u6210\u3057\u307e\u3059<br \/>\n<img loading=\"lazy\" class=\"alignnone size-medium wp-image-5468\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/addNewstate-300x233.png\" alt=\"addNewstate\" width=\"600\" height=\"466\" srcset=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/addNewstate-300x233.png 300w, https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/addNewstate.png 1280w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Entry\u304b\u3089\u3001\u4eca\u4f5c\u6210\u3057\u305f\u72b6\u614b\u3078\u77e2\u5370\u304c\u4f38\u3073\u3066\u3044\u308b\u3053\u3068\u304c\u3001\u78ba\u8a8d\u3067\u304d\u308b\u304b\u3068\u601d\u3044\u307e\u3059<br \/>\n\u3053\u308c\u306f\u3001\u958b\u59cb\u3059\u308b\u3068New State\u3078\u79fb\u884c\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3059<br \/>\nNew State\u306e\u540d\u524d\u3092Pause\u306b\u3057\u3066\u3001Motion\u306b\u597d\u304d\u306a\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u8a2d\u5b9a\u3057\u307e\u3059<br \/>\n\u305d\u3057\u3066\u3001\u4eca\u4f5c\u6210\u3057\u305fAnimator\u3092\u3001unitychan\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078D&amp;D\u3057\u307e\u3059<br \/>\nunitychan\u306bAnimator\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u3001Avatar\u3092BoxUnityChanAvatar\u306b\u3057\u307e\u3059<br \/>\n\u30d7\u30ec\u30a4\u3059\u308b\u3068\u3001\u81ea\u5206\u304c\u8a2d\u5b9a\u3057\u305f\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059<br \/>\n<img loading=\"lazy\" class=\"alignnone size-medium wp-image-5471\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/play_animation-1-300x233.png\" alt=\"play_animation\" width=\"600\" height=\"466\" srcset=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/play_animation-1-300x233.png 300w, https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/play_animation-1.png 1280w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<h3>\u30b9\u30af\u30ea\u30d7\u30c8\u5185\u304b\u3089\u306e\u5909\u66f4<\/h3>\n<p>\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u6642\u9593\u3084\u64cd\u4f5c\u306b\u3088\u3063\u3066\u5e38\u306b\u5909\u5316\u3057\u3066\u3044\u308b\u305f\u3081\u306b\u4eca\u56de\u306f\u3001\u3042\u308b\u30ad\u30fc\u3092\u62bc\u3057\u305f\u3089\u30dd\u30fc\u30ba\u304c\u5909\u308f\u308b\u3088\u3046\u306b\u3057\u307e\u3059<\/p>\n<p>\u5148\u307b\u3069\u4f5c\u6210\u3057\u305fAnimator\u306b\u3001\u3082\u3046\u4e00\u3064\u306e\u72b6\u614b\u3092\u8ffd\u52a0\u3057\u307e\u3059<br \/>\n\u3055\u3089\u306bPause\u3092\u53f3\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001Make Transition\u3067\u65b0\u305f\u306b\u8ffd\u52a0\u3057\u305f\u72b6\u614b\u3078\u77e2\u5370\u3092\u4f38\u3070\u3057\u307e\u3059<br \/>\n\u9006\u306b\u3001\u65b0\u305f\u306b\u8ffd\u52a0\u3057\u305f\u72b6\u614b\u304b\u3089\u3082Pause\u3078\u77e2\u5370\u3092\u4f38\u3070\u3057\u307e\u3059<br \/>\n\u3053\u308c\u3060\u3051\u3067\u306f\u3001\u7121\u6761\u4ef6\u3067\u72b6\u614b\u304c\u5909\u5316\u3059\u308b\u306e\u3067\u6761\u4ef6\u3092\u8ffd\u52a0\u3057\u307e\u3059<br \/>\nParameters\u306b\u3042\u308b+\u3067\u8ffd\u52a0\u3057\u3066\u3044\u304d\u307e\u3059<br \/>\n\u4eca\u56de\u306f\u4e0a\u77e2\u5370\u30ad\u30fc\u3092\u62bc\u3059\u305f\u3073\u306b\u72b6\u614b\u306e\u5909\u5316\u3092\u3055\u305b\u305f\u3044\u306e\u3067Bool\u3067\u3044\u3044\u3068\u601d\u3044\u307e\u3059<br \/>\n\u540d\u524d\u306f\u304a\u597d\u304d\u306a\u306e\u3067\u3069\u3046\u305e<br \/>\n<img loading=\"lazy\" class=\"alignnone size-medium wp-image-5473\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/change-300x233.png\" alt=\"change\" width=\"600\" height=\"466\" srcset=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/change-300x233.png 300w, https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/change.png 1280w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u3067\u306f\u3001Pause\u304b\u3089\u4f38\u3073\u308b\u77e2\u5370\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059<br \/>\nConditions\u306e+\u3092\u62bc\u3059\u3068Parameters\u3067\u8ffd\u52a0\u3057\u305f\u5024\u3092\u6761\u4ef6\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059<br \/>\n\u9006\u306e\u77e2\u5370\u306b\u306f\u3001\u9006\u306e\u6761\u4ef6\u3092\u8ffd\u52a0\u3057\u307e\u3059<\/p>\n<p>\u30d7\u30ec\u30a4\u3057\u305f\u72b6\u614b\u3067Parameters\u306e\u5024\u3092\u5909\u5316\u3055\u305b\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u306e\u3067\u305d\u3053\u3067\u78ba\u8a8d\u3082\u3057\u3066\u307f\u307e\u3057\u3087\u3046<\/p>\n<p>\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4f5c\u6210\u3092\u3057\u3066\u3044\u304d\u307e\u3059<\/p>\n<pre style=\"border: dashed #000000 1px; padding-left: 5px;\"><code>using UnityEngine;\r\n\r\npublic class unitychan : MonoBehaviour {\r\n\r\n    bool up = false;\r\n    Animator animator;\r\n\r\n\tvoid Start () {\r\n        \/\/\u6700\u521d\u306bunitycahn\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u304b\u3089Animator\u3092\u53d6\u5f97\r\n        animator = GetComponent();\r\n\t}\r\n\t\r\n\tvoid Update () {\r\n        \/\/\u8a2d\u5b9a\u3057\u305f\u5909\u6570\u540d\u3068\u72b6\u614b\u306e\u30bb\u30c3\u30c8\r\n        animator.SetBool(\"State\", up);\r\n\t}\r\n\r\n    private void FixedUpdate()\r\n    {\r\n        \/\/\u4e0a\u77e2\u5370\u306e\u611f\u77e5\r\n        if (Input.GetKeyDown(KeyCode.UpArrow))\r\n        {\r\n            \/\/\u73fe\u5728\u306e\u5024\u3068\u9006\u306e\u5024\u3092\u5165\u308c\u308b(true\u306a\u3089false, false\u306a\u3089true)\r\n            up = !up;\r\n        }\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>\u6700\u5f8c\u306b\u4eca\u3001\u4f5c\u6210\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092unitychan\u306bD&amp;D\u3059\u308b\u3053\u3068\u3067\u5b8c\u4e86\u3067\u3059\uff01<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-5475\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2017\/02\/motionChange.gif\" alt=\"motionChange\" width=\"693\" height=\"405\" \/><\/p>\n<h3>\u6700\u5f8c\u306b<\/h3>\n<p>\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306f\u30b2\u30fc\u30e0\u3084\u30e0\u30fc\u30d3\u30fc\u3067\u306f\u3001\u975e\u5e38\u306b\u91cd\u8981\u306a\u5f79\u5272\u3092\u6301\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u898b\u3066\u3044\u308b\u4eba\u306b\u9055\u548c\u611f\u3092\u4e0e\u3048\u306a\u3044\u3088\u3046\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3068\u306a\u308a\u307e\u3059<\/p>\n<p>\u4eca\u56de\u3067\u306f\u3001\u73fe\u5728\u306e\u52d5\u304d\u304c\u5b8c\u4e86\u3059\u308b\u307e\u3067\u6b21\u306e\u52d5\u4f5c\u306b\u306f\u79fb\u308c\u306a\u3044\u3088\u3046\u306a\u8a2d\u5b9a\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u304c\u30b2\u30fc\u30e0\u3060\u3068\u975e\u5e38\u306b\u64cd\u4f5c\u611f\u306e\u60aa\u3044\u3082\u306e\u306b\u306a\u308a\u307e\u3059<br \/>\n\u3053\u3046\u3044\u3063\u305f\u3053\u3068\u306b\u6c17\u3092\u4ed8\u3051\u3066\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u89e6\u3063\u3066\u3044\u304d\u305f\u3044\u3067\u3059<\/p>\n<p>\u706b\u66dc\u65e5\u62c5\u5f53\uff1apoppy<\/p>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/5466\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/5466\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"Unity\u306e\u5b66\u7fd2 part6\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/5466\" data-text=\"Unity\u306e\u5b66\u7fd2 part6\" data-via=\"GIGASJAPAN_APPS\" data-lang=\"ja\">Tweet<\/a><\/div>\n            <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/5466\" layout=\"button_count\" action=\"like\" width=\"100\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>\n            <div class=\"wsbl_facebook_send\"><div id=\"fb-root\"><\/div><fb:send href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/5466\" colorscheme=\"light\" ><\/fb:send><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u56de\u306f\u3001\u30e2\u30c7\u30eb\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059 \u3061\u306a\u307f\u306b\u30ed\u30fc\u30c9\u30de\u30c3\u30d7\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u304a\u308a\u307e\u3059 \u30e2\u30c7\u30eb\u3092\u4f7f\u7528\u3057\u305f\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u30ed\u30fc\u30c9\u30de\u30c3\u30d7 1. \u30e2\u30c7\u30eb\u306e\u53d6\u5f97\u3068\u914d\u7f6e\u3000 2. \u30e2\u30c7\u30eb\u306b\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a\u3000\u2190\u4eca\u56de\u306e\u8a18 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[100,109],"tags":[56,108,110],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/5466"}],"collection":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/comments?post=5466"}],"version-history":[{"count":11,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/5466\/revisions"}],"predecessor-version":[{"id":5483,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/5466\/revisions\/5483"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=5466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=5466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=5466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}