How to publish a plugin as global?

Hi everyone
I wrote a plugin name is Toolbox its working fine. How can i share this plugin to other project?
I try to copy plugin directory to $UE_HOME\Engine\Plugins and start a new project
but can not compile when activate it

error log is

Expecting to find a type to be declared in a module rules named ‘Toolbox’ in UE5Rules, Version=, Culture=neutral, PublicKeyToken=null. This type must derive from the ‘ModuleRules’ type defined by Unreal Build Tool.

It sounds like your plugin is named ‘Toolbox’ and in that plugin you have a module that is also named ‘Toolbox’, is that correct? If so, there may be something wrong with how you’ve defined the module class.

Your code module ‘Toolbox’ needs to be defined in Toolbox.Build.cs in a way that looks like this:

using UnrealBuildTool;
using System;
using System.IO;

public class Toolbox : ModuleRules
    public Toolbox(ReadOnlyTargetRules Target) : base(Target)
        // Module settings and dependencies go in here - see

You also need a C++ class in your module that is associated with the Toolbox C# class. You (probably) want that to be called FToolboxModule, and add it in ToolboxModule.h / ToolboxModule.cpp. It should inherit from IModuleInterface. It gets associated with the C# class, by including the following macro in ToolboxModule.cpp:

IMPLEMENT_MODULE(FToolboxModule, Toolbox)

I think my codes are all correct, The project included plugin can compile and run.
but cannot activate in other projects when I copied plugin directory to $UE_HOME\Engine\Plugins

here is code: GitHub - wantg/UnrealEditorToolbox: Empty project with a example plugin for try to create a global plugin

Depends on what you’re compiling/running in your other project, but the only other thing I can think of at the moment is that your Toolbox.uplugin lists the Toolbox module as Type “Editor” - if your other project references Toolbox code in non-editor builds (e.g. Development Game or Shipping), then the module will be missing because it’s been marked to not load except in Editor builds. If this is the problem you just need to either change the Type in Toolbox.uplugin, or you need to wrap #includes and related code with #if WITH_EDITOR

Someone told me a while ago that you must put it in the Plugins/Marketplace folder for it to work.

Magic rule but its worked

Thanks too

1 Like