{"id":724,"date":"2015-10-21T13:24:42","date_gmt":"2015-10-21T04:24:42","guid":{"rendered":"http:\/\/nantoka.filmm.info\/blog\/?p=724"},"modified":"2015-10-21T13:25:46","modified_gmt":"2015-10-21T04:25:46","slug":"js%e3%81%a8cs%e9%96%93%e3%81%a7%e3%81%ae%e3%83%87%e3%83%bc%e3%82%bf%e3%81%ae%e5%8f%97%e3%81%91%e6%b8%a1%e3%81%97","status":"publish","type":"post","link":"https:\/\/nantoka.filmm.info\/blog\/?p=724","title":{"rendered":"Js\u3068cs\u9593\u3067\u306e\u30c7\u30fc\u30bf\u306e\u53d7\u3051\u6e21\u3057"},"content":{"rendered":"<p>JS\u3068CS\u9593\u3067\u306f\u3044\u304f\u3089<strong>static\u304c\u795e\u306e\u9818\u57df<\/strong>\u3068\u3044\u3048\u3069\uff0c\u5909\u6570\u3084\u30af\u30e9\u30b9\u306f\u547c\u3073\u51fa\u305b\u307e\u305b\u3093\uff0e<\/p>\n<p>\u3068\u306f\u3044\u3048\uff0e\u3044\u304f\u3064\u304b\u306e\u6761\u4ef6\u3067\u6a4b\u6e21\u3057\u304c\u3067\u304d\u307e\u3059\uff0e<\/p>\n<p>\u305d\u308c\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u30eb\u30fc\u30eb\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n<p>\uff08\uff11\uff09\u7279\u5b9a\u540d\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\uff0c\u547c\u3070\u308c\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u305d\u3053\u306b\u5165\u308c\u308b<\/p>\n<p>\u7279\u5b9a\u540d\u306e\u30d5\u30a9\u30eb\u30c0\u3068\u306f\uff0cStandard Assets\u304b\uff0cPlugins\u3068\u306a\u308a\u307e\u3059\uff0e\u305f\u3060\uff0cStandard Assets\u306f\uff0cStandardAssets\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u8aad\u307f\u8fbc\u3093\u3060\u969b\u306b\u4f5c\u3089\u308c\u308b\u30d5\u30a9\u30eb\u30c0\u3068\u305f\u3076\u3093\u540c\u540d\u306a\u306e\u3067\u4f55\u304b\u3068\u4e0d\u5b89\uff0e\u305d\u3053\u3067Plugins\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\uff0c\u547c\u3070\u308c\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u305d\u3053\u306b\u5165\u308c\u308b\uff0e<\/p>\n<p>\uff08\uff12\uff09\u5fc5\u305aGameObject\u306b\u30a2\u30b5\u30a4\u30f3<\/p>\n<p>\u547c\u3076\u5074\u306e\u30b9\u30af\u30ea\u30d7\u30c8\uff0c\u547c\u3070\u308c\u308b\u5074\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3068\u3082\u306b\u306a\u306b\u304b\u306eGameObject\uff08create empty\u3067\u3082OK\uff09\u306b\u30a2\u30b5\u30a4\u30f3\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e\u4ee5\u4e0b\u306e\u547c\u3073\u51fa\u3059\u5074\u4f8b\u306fthis.\u25cb\u25cb\u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067\uff0c\u540c\u3058GameObject\u306b\u30a2\u30b5\u30a4\u30f3\u3057\u3066\u3044\u307e\u3059\uff0e\u8a66\u3057\u3066\u306f\u3044\u307e\u305b\u3093\u304c\uff0cfind\u25cb\u25cb\u3092\u4f7f\u3048\u3070\u5225\u306e\u5834\u6240\u306b\u30a2\u30b5\u30a4\u30f3\u3057\u3066\u3044\u3066\u3082\u547c\u3073\u51fa\u305b\u308b\u306e\u3067\u306f\uff1f<\/p>\n<p>\uff08\uff13\uff09\u547c\u3076\u5074\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u7279\u5b9a\u30d5\u30a9\u30eb\u30c0\u4ee5\u5916\u3067<\/p>\n<p>\u6574\u7406\u304c\u9762\u5012\u3067\u3082\uff0c\u547c\u3073\u51fa\u3059\u5074\u306e\u30d5\u30a9\u30eb\u30c0\u306fPlugins\u30d5\u30a9\u30eb\u30c0\u4ee5\u5916\u306e\u5834\u6240\u306b\u4fdd\u5b58\u3057\u3066\u304f\u3060\u3055\u3044\uff0e\u306a\u3093\u3060\u304b\u30a8\u30e9\u30fc\u304c\u3067\u307e\u3059\uff0e<\/p>\n<h2>\u30b9\u30af\u30ea\u30d7\u30c8\u4f8b<\/h2>\n<h4>\u547c\u3070\u308c\u308b\u5074<\/h4>\n<p>\u30fc\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306fPlugins\u30d5\u30a9\u30eb\u30c0\u306b\u5165\u308c\u308b<\/p>\n<pre class=\"lang:js decode:true\" title=\"calledVar.js\">#pragma strict\r\nvar neko : int = 100;\r\nfunction Start () {\r\n}\r\n\r\nfunction Update () {\r\n}\r\n\r\nfunction test(){ \/\/sample of call method\r\nprint(\"neko\"); \/\/return text message\r\n}<\/pre>\n<p>\u547c\u3073\u51fa\u3059\u5074<\/p>\n<p>\u30fc\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f<strong>Plugins\u30d5\u30a9\u30eb\u30c0\u4ee5\u5916\u306b<\/strong>\u4fdd\u5b58<\/p>\n<pre class=\"lang:default decode:true \" title=\"Scriptcall.cs\">using UnityEngine;\r\nusing System.Collections;\r\n\r\npublic class Scriptcall : MonoBehaviour {\r\n\tprivate calledVar jsScript;\/\/calledVar\u306fjs\u306e\u30d5\u30a1\u30a4\u30eb\u540d\uff0e\u3053\u308c\u3092\u5909\u6570\u306e\u578b\u306b\u3059\u308b\u3063\u3066\uff1f\u8b0e\r\n\t\/\/ Use this for initialization\r\n\tvoid Awake () { \/\/Awake\u306f\u521d\u56de\u306b1\u56de\u306e\u307f\u547c\u3073\u51fa\u3055\u308c\u308b\u95a2\u6570\r\n\t\tjsScript = this.GetComponent&lt;calledVar&gt;(); \/\/\u3053\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3064\u3044\u3066\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u547c\u3073\u51fa\u3059\u3068\u3044\u3046\u3082\u306e\r\n\t}\r\n\r\n\r\n\tvoid Start () {\r\n\t\r\n\t\tDebug.Log (jsScript.neko); \/\/\u3053\u308c\u3067js\u3067\u8a2d\u5b9a\u3057\u305fint10\u304c\u898b\u3048\u307e\u3059\r\n\r\n\r\n\t}\r\n\t\/\/ Update is called once per frame\r\n\tvoid Update () {\r\n\t\tjsScript.test ();\/\/\u3053\u308c\u3067js\u5185\u306efunction\u3082\u5b9f\u884c\u3067\u304d\u307e\u3059\r\n\/\/\t\tDebug.Log (jsScript.neko);\r\n\t}\r\n}\r\n<\/pre>\n<p>\u306a\u305e\u3060\u3089\u3051\u3067\u3059\u304c\uff0c\u3053\u308c\u3067\u52d5\u304f\u307f\u305f\u3044\u3067\u3059\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JS\u3068CS\u9593\u3067\u306f\u3044\u304f\u3089static\u304c\u795e\u306e\u9818\u57df\u3068\u3044\u3048\u3069\uff0c\u5909\u6570\u3084\u30af\u30e9\u30b9\u306f\u547c\u3073\u51fa\u305b\u307e\u305b\u3093\uff0e \u3068\u306f\u3044\u3048\uff0e\u3044\u304f\u3064\u304b\u306e\u6761\u4ef6\u3067\u6a4b\u6e21\u3057\u304c\u3067\u304d\u307e\u3059\uff0e \u305d\u308c\u306b\u306f\u3044\u304f\u3064\u304b\u306e\u30eb\u30fc\u30eb\u304c\u3042\u308a\u307e\u3059\uff0e \uff08\uff11\uff09\u7279\u5b9a\u540d\u306e\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\uff0c\u547c\u3070\u308c\u308b\u30b9\u30af\u30ea\u30d7\u30c8 &hellip; <a href=\"https:\/\/nantoka.filmm.info\/blog\/?p=724\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">Js\u3068cs\u9593\u3067\u306e\u30c7\u30fc\u30bf\u306e\u53d7\u3051\u6e21\u3057<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,11,2],"tags":[],"class_list":["post-724","post","type-post","status-publish","format-standard","hentry","category-c","category-javascript","category-unity"],"_links":{"self":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/724","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=724"}],"version-history":[{"count":2,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/724\/revisions"}],"predecessor-version":[{"id":726,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/724\/revisions\/726"}],"wp:attachment":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=724"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=724"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=724"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}