Plugin structure

A plugin contains three folders - Classes, Private and Public. What strategy should I use when placing files in these folders?

Please read this:

Heh, so you downvote a legit answer?

Anything placed in private folder is not available in blueprints, isn’t it? What is difference between classes and public? For example, UMGEditor places WidgetGraphSchema,WidgetBlueprintFactory in classes folder. And DesignerExtension, UMGEditorModule in public folder. What is the logic?

Because I read it before, and it didn’t help me.

UE4 code is divided in to modules when you write anything for UE4 you make a module. Private forder contains code private to a module which can be accessed only by that module, public contains code which can be accessed outside the module, i not sure what Classes directory was but they are not needed now due to changes in updates what you see in UE4 source is not transitioned stuff. In general practice you should put header files to public and cpp files to private as they don’t need to be accessed externaly all other modules need is header files.

This is structure you use in C++ projects and UE4 engine code it self… since all of them are same kind of modules. It’s importent to understand that code UE4 regardless where it is functions the same and can do the same, only different with plugins is that you can use this code in multiple projects, so don’t over think it. Also if you do any editor code like UI stuff and such (note that this does not include blueprint nodes they need to be accessible in runtime) you need to place them in separate module and mark module as editor module in uplugin file (you can do the same in uproject file btw), editor apis… more specifically editor modules are not accessable in runlime, they simply not packaged with the game, so if you use editor api in runtime module you will have compiler errors durring packageing. But you can use editor apis in runtime module if oyu put it in macro conditinal #if WITH_EDITOR #endif so that potion of hte ocde will be ignored during packageing.

Thanks for the answer. Mostly I was worried about classes folder. If it isn’t really need, then everything is clear.

But you said that private makes code inaccessible from blueprint, only header file needs to be public for that.