UE4 Learning notes UE4 and creating plugins

Source: Internet
Author: User
Tags button type visual studio

Record a C + + small white how hard self-learning UE4 plugin development ...

Try to chew the C + + primer alone without foundation, the learning curve is too steep and the progress is slow. So probably understand the C + + class, variables, grammar what the basic knowledge, while doing learning has always been more secure.

Next you need to install the basic environment,win10+the Visual Studio 2017+ue4.18 version. UE4 's official Learning document (currently the latest is the UE4.9 version, the C + + development example, many of the parameter names have been modified, and some of the sample code is wrong, for reference only, avoid stepping on the pit) UE4 developed reference API
52VR Community-ue4 section: Related communities

The development of plug-ins, first of all the implementation of the function, how to appear in the UE4 editor interface of our own function button it. Like this:


attention. The first thing to ensure that the project has a C + + code solution, that is to start a new C + + project or add C + + code of the normal project, or you can not create a new button and a window with a variety of plug-in types, as shown below :


Click: Edit->plugins Pop-up window has a green New Plugin button in the bottom right corner, click and select Editor ToolBar button type (of course you can also choose editor Standalone window-- Click the button will pop up a new window), enter the plugin name is OK, after successful UE4 will automatically open VS2017 and scan the project directory, visible plugins folder has been added to the project, as shown:


Testplugin.uplugin is a plugin documentation that contains information such as the plugin author, version, description, type, and loading phase, as shown in the figure:

Among them, the "Modules" configuration is more important, a plug-in can contain multiple modules, you need to configure the name, type and loading phase.  Type: Runtime will load in any case.  Runtimenocommandletruntime mode but does not contain commands. Developer is loaded only in development (development) mode and in edit mode, and is not loaded after packaging (Shipping).  Editor is loaded only when the editor is started.  Editornocommandleteditor mode but does not contain commands. Program's standalone application.

The TestPlugin.Build.cs file is an important file that tells vs how to compile the plugin, which contains information such as the dependent module name, loading directory, and so on.

The TestPluginStyle.cpp file is configured with icon format, picture file information, and so on.

The TestPluginCommands.cpp file configures the UI implementation of the plug-in in the UE4 editor, including prompt information, and so on.

The TestPlugin.cpp file is a specific feature implementation file that includes plug-in button click events, exit events, and so on.

We look at the directory structure outside the VS2017, we will find two more directories, this is the project compiled automatically generated UE4 the actual needs of the directory, it is not necessary to correctly run the plug-in, plug-in code modifications need to recompile the project.


about plugin porting : The created plug-in is project-based, and if the new project is lost , you can copy the corresponding plug-in folder in the plugins directory of the project containing the plug-in to the corresponding location in the new project and reopen the editor.

So this plug-in is created well, the implementation of specific features ... 2333 next time to mend.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.