UE 5.5+ Python plugin uobject classes not reflected

Hi Community and Devs,

I was wondering if anyone else has been using UE5.5+ with Remote Control and calling Python UObjects?

In 5.3 and 5.4 we had uobject python classes that were getting there functions called remotely and everything worked perfectly. Since 5.5+ that has been broken ( I have also built the latest source 5.7 and it looks to still not work).

I came across this ticket Unreal Engine Issues and Bug Tracker (UE-247331) that outlines the same issue and it mentions that is has been fixed, but in my plugin scenario still fails.

Reproduction steps

  1. Create a UE Plugin, and in Contents\Python create a .py file with the following content
import unreal


@unreal.uclass()
class PyRemoteDebug(unreal.BlueprintFunctionLibrary):
# class PyRemoteDebug(unreal.Object): # also tested inheriting from Object, but made no difference

    @unreal.ufunction(
        params=[str],
        ret=bool,
        static=True,
        meta=dict(Category="PythonRemoteDebugging")
    )
    def check_check_123(name:str):
        """
        Simple log method to check the command is getting triggered
        """

        unreal.log(f"This is working, {name}!")
        return True
  1. Make sure the plugin requires Remote Control and Python development plugin
  2. In Postman ( I used it for the quickest test turn around)
    • Set the request to PUT to the following address 127.0.0.1:30010/remote/object/call
    • Set the Body to raw and the payload to
{
    "objectPath":"/Engine/PythonTypes.Default__PyRemoteDebug",
    "functionName":"check_check_123",
    "parameters":
        {
            "name":"Developer"
        },
    "generateTransaction":true
}

Result: In unreal it will log that the Python type does not exist, but you can manually call the code using the command line.

LogRemoteControl: Error: Web Remote Call deserialization error: Object: /Engine/PythonTypes.Default__PyRemoteDebug does not exist.

I am not sure if something has changed with how one is meant to structure python classes that want to be utilised in unreal as uobjects, or if the fix mentioned in UE-247331 might have not taken this scenario into account.

Any help would be greatly appreciated :slight_smile:

I managed to investigate a bit further, looks like the documentation needs to be updated as the Python Names no longer appear as mentioned.

Old object path naming in documentation:

# /Engine/PythonTypes.Default__PythonClassUObjectName

5.5 Python Object Path.
As seen below it points to the Plugins Content Python folder and then uses the packages as a folder structure, and the module as the file name _PY,

# /ueGear/Python/ueGear/commands_PY.Default__PythonClassUObjectName

This was tested in UE 5.5

To get the new object path use the following command in Unreals Python command.

import custom_module

new_instance = custom_module.CustomUObjectClass()

# will print out the new name that should be used in the Remote Object Path
# 'uobject instance'.get_default_object().get_path_name()
obj_path = new_instance.get_default_object().get_path_name()
print(obj_path)

NOTE: Another thing to be aware of!!

  • If you are calling a python function that was not overriden, then you call using the python method name.```@unreal.ufunction()```

  • If you are calling a method that was overriden then is seems like you need to call the method using the C++ name.```@unreal.ufunction(override=True)```