{"id":142,"date":"2024-10-23T10:38:11","date_gmt":"2024-10-23T10:38:11","guid":{"rendered":"https:\/\/www.portalsunited.com:443\/?post_type=docs&#038;p=142"},"modified":"2024-11-06T09:21:32","modified_gmt":"2024-11-06T09:21:32","password":"","slug":"world-builder-how-to-create-a-plugin","status":"publish","type":"docs","link":"https:\/\/www.portalsunited.com:443\/docs\/world-builder-how-to-create-a-plugin\/","title":{"rendered":"World Builder &#8211; How to create a plugin?"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Setup<\/h4>\n\n\n\n<p>For creating a plugin, you&#8217;ll need to create your own Dynamic Linked Library (DLL). It should be a C# .NET Framework library, with dependencies for <em>Unity Engine<\/em> and <em>World Builder Plugin Core<\/em>.<\/p>\n\n\n\n<p>You&#8217;ll find the Unity Engine dlls in the sub folder of the World Builder installation path: &#8220;[INSTALL_PATH]\\World Builder\\World Builder_Data\\Managed&#8221;<br>You&#8217;ll find a dll with the name <em>&#8220;com.nuro.world-builder.plugin-core.dll&#8221;<\/em>, this dll is the Plugin Core library for the World Builder. It includes all the interfaces and classes that you&#8217;ll need to integrate your plugin into the World Builder ecosystem.<\/p>\n\n\n\n<p>After your setup for development is done, you can start with development. A World Builder Plugin always derives from PluginBase plus all the Plugin interfaces that you want to implement. One dll may contain multiple plugins.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Example<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>using System;\nusing UnityEngine.UIElements;\nusing Nuro.Processes;\nusing WorldBuilder.Plugins;\n\nnamespace MY_PLUGIN_NAMESPACE\n{\n    public class MyPlugin : PluginBase, IWizard, ILocalization\n    {\n        public override PluginFeatureFlags Features =&gt; PluginFeatureFlags.Wizard | PluginFeatureFlags.Localization;\n\tpublic virtual string LocalizationFolderName =&gt; \"My Plugin Localization\";\n\n        public string WizardName =&gt; \"My Plugin\";\n\n        public string WizardDescription =&gt; \"This is my new cool plugin for the World Builder\";\n\n        public bool VisibleInWizardList =&gt; true;\n\n        public Process CreateRunProcess(VisualElement root, Action onCancel = null)\n        {\n            return new Process(\"My Plugin Run Process\", null);\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p>As you can see, we&#8217;re implementing two plugin interfaces, 1st IWizard for a wizard plugin and 2nd ILocalization for custom localization support of a plugin.<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading142_cc1f0f-e1, .wp-block-kadence-advancedheading.kt-adv-heading142_cc1f0f-e1[data-kb-block=\"kb-adv-heading142_cc1f0f-e1\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading142_cc1f0f-e1 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading142_cc1f0f-e1[data-kb-block=\"kb-adv-heading142_cc1f0f-e1\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}<\/style>\n<h4 class=\"kt-adv-heading142_cc1f0f-e1 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading142_cc1f0f-e1\">Plugins folder<\/h4>\n\n\n\n<p>To integrate the plugin,, copy your dll-file into the sub folder of the World Builder: &#8220;[INSTALL_PATH]\\World Builder\\Plugins\\External\\[PLUGIN_NAME]\\&#8221;<br>If you have localization csv-files, they should be in the LocalizationFolderName that you specified in the plugin. For the example above it would be: &#8220;[INSTALL_PATH]\\World Builder\\Plugins\\External\\MyPlugin\\My Plugin Localization\\&#8221;<\/p>\n\n\n<style>.wp-block-kadence-advancedheading.kt-adv-heading142_70e7f7-51, .wp-block-kadence-advancedheading.kt-adv-heading142_70e7f7-51[data-kb-block=\"kb-adv-heading142_70e7f7-51\"]{font-style:normal;}.wp-block-kadence-advancedheading.kt-adv-heading142_70e7f7-51 mark.kt-highlight, .wp-block-kadence-advancedheading.kt-adv-heading142_70e7f7-51[data-kb-block=\"kb-adv-heading142_70e7f7-51\"] mark.kt-highlight{font-style:normal;color:#f76a0c;-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}<\/style>\n<h4 class=\"kt-adv-heading142_70e7f7-51 wp-block-kadence-advancedheading\" data-kb-block=\"kb-adv-heading142_70e7f7-51\">Plugin types<\/h4>\n\n\n\n<p>Even though there are more types of plugins available under PluginFeatureFlags, the most common ones you&#8217;ll be using are Wizard, Tool, AssetsProvider and Localization.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Setup For creating a plugin, you&#8217;ll need to create your own Dynamic Linked Library (DLL). It should be a C# .NET Framework library, with dependencies for Unity Engine and World Builder Plugin Core. You&#8217;ll find the Unity Engine dlls in the sub folder of the World Builder installation path: &#8220;[INSTALL_PATH]\\World Builder\\World Builder_Data\\Managed&#8221;You&#8217;ll find a dll&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"doc_category":[16],"doc_tag":[],"class_list":["post-142","docs","type-docs","status-publish","hentry","doc_category-world-builder-extensions"],"year_month":"2025-08","word_count":325,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"holger.kuerten","author_nicename":"holger-kuerten","author_url":"https:\/\/www.portalsunited.com:443\/author\/holger-kuerten\/"},"doc_category_info":[{"term_name":"World Builder - Extensions","term_url":"https:\/\/www.portalsunited.com:443\/docs-category\/world-builder-extensions\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/www.portalsunited.com:443\/wp-json\/wp\/v2\/docs\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.portalsunited.com:443\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.portalsunited.com:443\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.portalsunited.com:443\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.portalsunited.com:443\/wp-json\/wp\/v2\/comments?post=142"}],"version-history":[{"count":9,"href":"https:\/\/www.portalsunited.com:443\/wp-json\/wp\/v2\/docs\/142\/revisions"}],"predecessor-version":[{"id":397,"href":"https:\/\/www.portalsunited.com:443\/wp-json\/wp\/v2\/docs\/142\/revisions\/397"}],"wp:attachment":[{"href":"https:\/\/www.portalsunited.com:443\/wp-json\/wp\/v2\/media?parent=142"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.portalsunited.com:443\/wp-json\/wp\/v2\/doc_category?post=142"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.portalsunited.com:443\/wp-json\/wp\/v2\/doc_tag?post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}