{"id":2109,"date":"2016-12-13T14:46:43","date_gmt":"2016-12-13T05:46:43","guid":{"rendered":"http:\/\/nantoka.filmm.info\/blog\/?p=2109"},"modified":"2016-12-13T14:46:43","modified_gmt":"2016-12-13T05:46:43","slug":"ncmb%e3%81%a7prefab%e7%94%9f%e6%88%90","status":"publish","type":"post","link":"https:\/\/nantoka.filmm.info\/blog\/?p=2109","title":{"rendered":"NCMB\u3067prefab\u751f\u6210"},"content":{"rendered":"<p>\u30d7\u30ec\u30d5\u30a1\u30d6\u751f\u6210<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:default decode:true \">\/\/\u5909\u6570\u8a2d\u5b9a\r\n\tpublic RectTransform nodePrefab;\r\n\tpublic RectTransform content;\r\n\r\n\/\/\/\/\u4ee5\u4e0b\u30b9\u30af\u30ea\u30d7\u30c8\u672c\u4f53\t\r\n\r\nint mymax2 = 6;\/\/for\u306e\u56de\u6570\r\n\t\tfor(int p = 0; p &lt; mymax2; p++){\r\n\t\t\tvar item = GameObject.Instantiate(nodePrefab) as RectTransform;  \/\/\u30d7\u30ec\u30d5\u30a1\u30d6\u3092\u751f\u6210\u3057\u3066item\u306b\u5165\u308c\u308b\r\n\t\t\titem.SetParent(content, false);\/\/\u305d\u308c\u3092contente\u306e\u5b50\u306b\u3059\u308b\uff08\u4e0a\u3067\u5909\u6570\u5ba3\u8a00\u3057\u3066\u3044\u308b\uff09\r\n\t\t\tGameObject labelobj = item.transform.Find(\"Label\").gameObject;\/\/\u305d\u306e\u4e2d\u304b\u3089Label\u3068\u3044\u3046\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u691c\u7d22\u3059\u308b\r\n\t\t\tvar idtextcompo = labelobj.GetComponent&lt;Text&gt; ();\/\/Label\u306e\u306f\u3044\u3063\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4e2d\u306e\u30c6\u30ad\u30b9\u30c8\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u53d6\u5f97\r\n\t\t\tidtextcompo.text = \"test\";\/\/\u305d\u306e\u6587\u5b57\u5217\u3092\u8a2d\u5b9a\r\n\r\n\t\t}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d7\u30ec\u30d5\u30a1\u30d6\u751f\u6210 &nbsp; \/\/\u5909\u6570\u8a2d\u5b9a public RectTransform nodePrefab; public RectTransform content; \/\/\/\/\u4ee5\u4e0b\u30b9\u30af\u30ea\u30d7\u30c8\u672c\u4f53 int mymax2  &hellip; <a href=\"https:\/\/nantoka.filmm.info\/blog\/?p=2109\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">NCMB\u3067prefab\u751f\u6210<\/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,33,2],"tags":[],"class_list":["post-2109","post","type-post","status-publish","format-standard","hentry","category-c","category-ncmb","category-unity"],"_links":{"self":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2109","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=2109"}],"version-history":[{"count":1,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2109\/revisions"}],"predecessor-version":[{"id":2110,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2109\/revisions\/2110"}],"wp:attachment":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}