{"id":3195,"date":"2015-10-07T13:36:19","date_gmt":"2015-10-07T04:36:19","guid":{"rendered":"http:\/\/madnesslabo.net\/utage\/?page_id=3195"},"modified":"2024-05-26T05:28:42","modified_gmt":"2024-05-25T20:28:42","slug":"%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9","status":"publish","type":"page","link":"https:\/\/madnesslabo.net\/utage\/?page_id=3195","title":{"rendered":"\u30ab\u30b9\u30bf\u30e0\u30b3\u30de\u30f3\u30c9\u306e\u4f7f\u3044\u65b9"},"content":{"rendered":"<p>\u30a8\u30af\u30bb\u30eb\u4e0a\u3067\u4f7f\u7528\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306b\u72ec\u81ea\u5b9a\u7fa9\u306e\u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0\u3057\u305f\u308a\u3001\u65e2\u5b58\u306e\u30b3\u30de\u30f3\u30c9\u306e\u5185\u5bb9\u3092\u66f8\u304d\u63db\u3048\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n<h2>\u4f5c\u6210\u624b\u9806<\/h2>\n<p>\u30b5\u30f3\u30d7\u30eb\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3001Utage\\Sample\\Scripts\\SampleCustomCommand.cs\u3000\u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>\u30b5\u30f3\u30d7\u30eb<\/h3>\n<p>\u30b5\u30f3\u30d7\u30eb\u3068\u3057\u3066\u3001Text\u5217\u306e\u5185\u5bb9\u3092Unity\u306eDebug.Log\u3068\u3057\u3066\u51fa\u529b\u3059\u308b\u30b3\u30de\u30f3\u30c9\u300cDebugLog\u300d\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<br \/>\n<img decoding=\"async\" src=\"http:\/\/madnesslabo.net\/utage\/wp-content\/uploads\/2015\/06\/ss_256.png\" alt=\"\" \/><\/p>\n<h3>\u30b3\u30fc\u30c9\u306e\u8a18\u8ff0<\/h3>\n<p>\u30ab\u30b9\u30bf\u30e0\u30b3\u30de\u30f3\u30c9\u306f\u3001AdvCustomCommandManager\u3092\u7d99\u627f\u3057\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u4f5c\u6210\u3057\u3001\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u3092\u767b\u9332\u3059\u308b\u3053\u3068\u3067\u4f5c\u6210\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-csharp\">using UnityEngine;\n\nnamespace Utage\n{\n    public class CustomCommandSample : AdvCustomCommandManager\n    {\n        public override void OnBootInit()\n        {\n            Utage.AdvCommandParser.OnCreateCustomCommandFromID+= CreateCustomCommand;\n        }\n\n        \/\/AdvEngin\u306e\u30af\u30ea\u30a2\u51e6\u7406\u306e\u3068\u304d\u306b\u547c\u3070\u308c\u308b\n        public override void OnClear()\n        {\n        }\n\n        \/\/\u30ab\u30b9\u30bf\u30e0\u30b3\u30de\u30f3\u30c9\u306e\u4f5c\u6210\u7528\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\n        public void CreateCustomCommand(string id, StringGridRow row, AdvSettingDataManager dataManager, ref AdvCommand command )\n        {\n            switch (id)\n            {\n                \/\/\u65e2\u5b58\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6539\u9020\u30b3\u30de\u30f3\u30c9\u306b\u5909\u3048\u305f\u3044\u5834\u5408\u306f\u3001ID\u3067\u5224\u5225\n                \/\/\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3092\u89e3\u9664\u3059\u308c\u3070\u3001\u30c6\u30ad\u30b9\u30c8\u8868\u793a\u304c\u30c7\u30d0\u30c3\u30b0\u30ed\u30b0\u51fa\u529b\u306e\u307f\u306b\u5909\u308f\u308b\n\/\/              case AdvCommandParser.IdText:\n\/\/                  command = new CustomAdvCommandText(row);\n\/\/                  break;\n                \/\/\u65b0\u3057\u3044\u540d\u524d\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f5c\u308b\n                case &quot;DebugLog&quot;:\n                    command = new AdvCommandDebugLog(row);\n                    break;\n            }\n        }\n    }\n}\n<\/code><\/pre>\n<p>\u5404\u30ab\u30b9\u30bf\u30e0\u30b3\u30de\u30f3\u30c9\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306b\u3001AdvCommand\u3092\u7d99\u627f\u3057\u305f\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre><code class=\"language-csharp\">\n    \/\/Text\u306e\u5185\u5bb9\u3092\u30c7\u30d0\u30c3\u30b0\u30ed\u30b0\u3067\u51fa\u529b\u3059\u308b\u30ab\u30b9\u30bf\u30e0\u30b3\u30de\u30f3\u30c9\n    public class AdvCommandDebugLog : AdvCommand\n    {\n        public AdvCommandDebugLog(StringGridRow row)\n            :base(row)\n        {\n            \/\/\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067Parse\u3059\u308b\u3068\u3001\u30a4\u30f3\u30dd\u30fc\u30c8\u6642\u306b\u30a8\u30e9\u30fc\u304c\u3067\u308b\n\n            \/\/\u300cText\u300d\u5217\u306e\u6587\u5b57\u5217\u3092\u53d6\u5f97\n            this.log = ParseCell&lt;string&gt;(AdvColumnName.Text);\n        }\n\n        \/\/\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\n        public override void DoCommand(AdvEngine engine)\n        {\n            Debug.Log(log);\n        }\n\n        string log;\n    }\n\n    \/\/ \u30c6\u30ad\u30b9\u30c8\u8868\u793a\u30b3\u30de\u30f3\u30c9\u3092\u66f8\u304d\u63db\u3048\u308b\u3002\n    \/\/ \u3042\u304f\u307e\u3067\u30b5\u30f3\u30d7\u30eb\u3068\u3057\u3066\u3001\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308b\u3060\u3051\u306b\n    public class CustomAdvCommandText : AdvCommand\n    {\n        public CustomAdvCommandText(StringGridRow row)\n            : base(row)\n        {\n            \/\/\u300cText\u300d\u5217\u306e\u6587\u5b57\u5217\u3092\u53d6\u5f97\n            this.log = ParseCell&lt;string&gt;(AdvColumnName.Text);\n        }\n\n        \/\/\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\n        public override void DoCommand(AdvEngine engine)\n        {\n            Debug.Log(log);\n        }\n\n        string log;\n    }\n<\/code><\/pre>\n<p>\u30fb\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067\u3001Arg1\u3084Text\u306a\u3069\u306e\u30a8\u30af\u30bb\u30eb\u306e\u5185\u5bb9\u3092\u89e3\u6790\u30fb\u53d6\u5f97\u3059\u308b<br \/>\n\u30fbDoCommand\u3067\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u51e6\u7406\u3092\u3059\u308b<br \/>\n\u3068\u3044\u3046\u306e\u304c\u57fa\u672c\u3067\u3059\u3002<br \/>\n\u30d5\u30a1\u30a4\u30eb\u3092\u30ed\u30fc\u30c9\u3057\u305f\u308a\u3001Wait\u51e6\u7406\u3092\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002\u8a73\u3057\u3044\u4f7f\u3044\u65b9\u306f\u3001\u65e2\u5b58\u306e\u30b3\u30de\u30f3\u30c9\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3>AdvEngine\u306bAddComponent<\/h3>\n<p>\u4f5c\u6210\u3057\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u3001\u5fc5\u305aAdvEngine\u306bAddComponent\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/madnesslabo.net\/utage\/wp-content\/uploads\/2015\/06\/ss_2551.png\" alt=\"\" \/><\/p>\n<h2>\u30bb\u30fc\u30d6\u30ed\u30fc\u30c9\u306b\u3082\u5bfe\u5fdc\u3059\u308b<\/h2>\n<p>\u30bb\u30fc\u30d6\u30ed\u30fc\u30c9\u306b\u5bfe\u5fdc\u3059\u308b\u5834\u5408\u306f\u3001<a href=\"http:\/\/madnesslabo.net\/utage\/?page_id=3086\">\u30bb\u30fc\u30d6\u30ed\u30fc\u30c9\u3092\u72ec\u81ea\u62e1\u5f35\u3059\u308b<\/a>\u3092\u53c2\u8003\u306b\u5fc5\u8981\u306a\u60c5\u5831\u3092\u30bb\u30fc\u30d6\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u6ce8\u610f\u70b9<\/h2>\n<p>\u30ab\u30b9\u30bf\u30e0\u30b3\u30de\u30f3\u30c9\u306f\u3001\u57fa\u672c\u7684\u306b\u306f\u300c\u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0\u300d\u3059\u308b\u5f62\u3067\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u30c6\u30ad\u30b9\u30c8\u8868\u793a\u306e\u3088\u3046\u306a\u65e2\u5b58\u306e\u30b3\u30de\u30f3\u30c9\u3092\u66f8\u304d\u63db\u3048\u308b\u306e\u306f\u975e\u63a8\u5968\u3067\u3059\u3002\u65e2\u5b58\u306e\u30b3\u30de\u30f3\u30c9\u306e\u5185\u90e8\u51e6\u7406\u306f\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3067\u5909\u308f\u3063\u3066\u3044\u304f\u306e\u3067\u3001\u4e92\u63db\u6027\u3092\u3068\u308b\u306e\u304c\u96e3\u3057\u304f\u306a\u308b\u304b\u3089\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a8\u30af\u30bb\u30eb\u4e0a\u3067\u4f7f\u7528\u3059\u308b\u30b3\u30de\u30f3\u30c9\u306b\u72ec\u81ea\u5b9a\u7fa9\u306e\u30b3\u30de\u30f3\u30c9\u3092\u8ffd\u52a0\u3057\u305f\u308a\u3001\u65e2\u5b58\u306e\u30b3\u30de\u30f3\u30c9\u306e\u5185\u5bb9\u3092\u66f8\u304d\u63db\u3048\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u4f5c\u6210\u624b\u9806 \u30b5\u30f3\u30d7\u30eb\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3001Utage\\Sample\\Scripts\\SampleCustomCo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":4780,"menu_order":5,"comment_status":"open","ping_status":"open","template":"","meta":{"_lmt_disableupdate":"no","_lmt_disable":"no","jetpack_post_was_ever_published":false,"footnotes":""},"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P58j32-Px","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/pages\/3195"}],"collection":[{"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3195"}],"version-history":[{"count":13,"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/pages\/3195\/revisions"}],"predecessor-version":[{"id":15048,"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/pages\/3195\/revisions\/15048"}],"up":[{"embeddable":true,"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=\/wp\/v2\/pages\/4780"}],"wp:attachment":[{"href":"https:\/\/madnesslabo.net\/utage\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}