Expose Blueprint Library Function to Web Remote Control

I’m trying to tie functionality in my plugin to the new web remote control.

In the documentation here:

… they suggest that I should be able to call functions on objects in game and assets as long as they expose a blueprint interface and the function is marked callable. I have successfully done so with my actor classes in game. But I need to do the same with a free blueprint function.

Like so:

UCLASS(ClassGroup = (MyBPLib))
class MY_API UMyAPI : public UBlueprintFunctionLibrary {

   GENERATED_BODY()
   public:
		
   UFUNCTION(BlueprintPure)
   static bool Test();
};

Now, I can call this function from a blueprint all right but the web server isn’t able to resolve the function. In the editor it issues an error that says that function “Test” on my object does not exist.

I have debugged it into RemoteControlModule.cpp line 104:

UObject* Object = StaticFindObject(UObject::StaticClass(), nullptr, *ObjectPath);
if (Object)
{
    // Find the function to call
    UFunction* Function = RemoteControlUtil::FindFunctionByNameOrMetaDataName(Object, FunctionName);

This returns null and issues the error. Now, When I debug in there, the object path gets resolved correctly, the function name is also OK but it gets null as function. Why?
The debugger doesn’t seem to be able to step further into there.
I have tried many different names and combinations of UFUNCTION decorators. To no avail.

Has anyone successfully done this? Or any idea what could be the cause? Somehow I have a hunch that this code path relies on actually getting a live object, which I don’t give it as it’s only a static function in a blueprint library.

Thanks for any response!

Stephan