Did 4.15 change the rules about plugin blueprint libraries?

We recently upgraded our 4.13 project to 4.15. Now I can’t build a shipping version of our plugin any more, although Development-Editor works fine.
When I build shipping I get:

2>D:\Projects\VRProjects\Engine\Plugins\Holospark\VRTools\Source\VRToolsFunctionLibrary.h(7): error C2504: ‘UBlueprintFunctionLibrary’: base class undefined

The file in question starts with:

#pragma once

#include “VRToolsFunctionLibrary.generated.h”

UCLASS()
class UVRToolsFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()

public:

This all works fine in Development-Editor, and worked in Shipping in 4.13. I thought that perhaps the new include what you need code might be at fault, so I tried adding “Kismet” to the list of dependencies, and that gave me:

2>EXEC : error : Non-editor build cannot depend on non-redistributable modules. D:\Projects\VRProjects\Engine\Binaries\Win64\UE4Game-Win64-Shipping.exe depends on …very long list… ‘BlueprintProfiler’, ‘Kismet’.

So apparently you can’t do that. But I find it hard to believe that you aren’t supposed to be able to make a blueprint library in a plugin any more. I note that our copy of FModStudioOculus has exactly the same issue with their blueprint library.

What’s the new magic to make this work?

Thanks

Rick

Try adding this to your includes at the top of that file:

#include "Kismet/BlueprintFunctionLibrary.h"

That should resolve that issue (although you could be missing other includes depending on what classes and such you reference).

Yeah, I tried that. That causes:

D:\Projects\VRProjects\Engine\Plugins\Holospark\VRTools\Source\VRToolsFunctionLibrary.h(9): error C2664: ‘UObject *UVRToolsFunctionLibrary::GetDefaultObject(TSubclassOf)’: cannot convert argument 1 from ‘UClass *’ to ‘TSubclassOf’
2> D:\Projects\VRProjects\Engine\Plugins\Holospark\VRTools\Source\VRToolsFunctionLibrary.h(9): note: use of undefined type ‘TSubclassOf’
2> D:\Projects\VRProjects\Engine\Plugins\Holospark\VRTools\Source\VRToolsFunctionLibrary.h(61): note: see declaration of ‘TSubclassOf’

in:
UCLASS()
class UVRToolsFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()

And this works in development-editor, and it used to work in 4.13. So I figured there’s something else I need to do.

Aha! OK, you were correct, liberal sprinkling of #include statements gets me past most of the problems. The one I posted above was actually caused by a function in the blueprint library, but confusingly showed up on the Generated_Body line.