[Interface] Automatic Blueprint implementation differs from signature

anonymous_user_d9744154
Thu, 21 May 2015 10:00:08 +0000
UI

Hi everyone,

I am trying to implement an Interface from a Blueprint, but it’s getting quite tricky, I don’t get what is happening…

I have a simple interface here :

#.h

#pragma once

#include "Components/WidgetComponent.h"
#include "InteractiveUIInterface.generated.h"

UINTERFACE(MinimalAPI)
class UInteractiveUIInterface : public UInterface
{
	GENERATED_UINTERFACE_BODY()
};

class IInteractiveUIInterface
{
	GENERATED_IINTERFACE_BODY()

	UFUNCTION(BlueprintImplementableEvent)
	bool OnButtonTriggered(int32 ID);

	UFUNCTION(BlueprintImplementableEvent)
	bool CreateTrigger(FTransform &triggerTransform, UWidgetComponent *&parent, int32 ID);
};

#.cpp

#include "SimulateurVR3D.h"
#include "InteractiveUIInterface.h"

UInteractiveUIInterface::UInteractiveUIInterface(const class FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
{

}

Here, nothing special, it compile, and I can choose to implement my interface in my blueprint.
But, if I go to the newly implemented function “CreateTrigger()”, here’s what I get :

Which differs slightly from what I asked… Two of my parameters are converted into return values…

I don’t know what I missed, I tried a few things, nothing seems to work better

Is anyone got an idea of what’s going on ?

Thanks !

4 posts - 1 participant