Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Adding Buttons and Text fields to UE4 Plugin

I'm new to UE4 plugins and I would like to add buttons and text fields into my "StandAlone Window" plugin in C++ that I have created for my project. I haven't found any useful information on the internet for implementing buttons and text fields for plugins in C++. I read the UE4 plugins documentation, but the documentation doesn't teach how to implement those kinds of things like buttons, text fields or icons inside the "StandAlone Window" plugin. Any help would be appreciated.

Product Version: UE 4.22
more ▼

asked Apr 17 '19 at 12:44 PM in C++ Programming

avatar image

25 2 2 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

First of all plugins are not some special code, enigne is build out of modules which can be dynamically loaded or build monoliticly similar fusion as Linux kernel. When you make C++, you creating extra module that will be added to the engine, plugin is no diffrent from that, only diffrence is you can attach extra modules (btw UE4 project can also have multiple modules) to any project. So essentially regardless where you write C++ code in UE4 you always extending engine code and it the same as you would add code to UE4 source code

That why instead of searching "Adding X thing to plugin" you should search those individual actions, like "Extending editor", or "Adding to editor"

But on topic at hand, if oyu think of doing any UI to the engine you should learn Slate first. Slate is UI system of UE4 originally made for editor in 4.0, but it can be used in games.... yes, UMG is just blueprint frontend for Slate. And it also means, if you familiar with UMG you should already have understanding how Slate UI works, you just need to learn how to use it in C++. You can read about it here:

https://docs.unrealengine.com/en-us/Programming/Slate https://slideplayer.com/slide/5265559/

If you learn this, you also will be able to make your own UMG widgets from C++, so learning Slate is actully next deep step in to advance use of UMG ;] Slate widget selection is actully bigger then UMGs as not all Slate widgets are exposed. Of Slate widgets orginalte from SWidget class, same as UMG widgets (which are shells for Slate widgets) are orginating from UWidget


And same as UMG, you make UI by making you own widget that can be reused. So you got option either create your own SCompoundWidget which will let you to reuse it or or or direly declare UI with nested SNew composition.

Now in to actually extending editor, the best way to do it is via extenders, as those allows to inject higns in to existing editor UI. Tehre very old tutorial which is still quite valid showing the basics:


It also shows Widget Reflector (Window->Devlopment Tools->WidgetReflector) which allows you to see slate widget tree of editor and inspect editor UI. With that you can see editor UI is made and by looking specific compound widgets names in engine source code, you can actually see how they are made (remeber plugin is no different from module in engine source code, you can do exact same things that those modules does)

Also there some templates in plugin wizard, you might check it out

As for making window you need to make SWindow and then you can add it with FSlateApplication::Get()->AddWindow() and you can do a lot more things from FSlateApplication::Get()


more ▼

answered Apr 17 '19 at 10:58 PM

avatar image

37.8k 937 172 1123

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question