asqbtcupid / unreal.lua

lua solution for UnrealEngine4
MIT License
300 stars 98 forks source link

bp call c++ bug? #23

Closed mirchd closed 6 years ago

mirchd commented 6 years ago

I have a blueprint BP_ui which is inherit from my cpp class UBaseUserWiget,

` UCLASS(BlueprintType, Blueprintable, meta = (lua = 1)) class CLIENT_API UBaseUserWiget : public UUserWidget { GENERATED_BODY() public: UBaseUserWiget(const FObjectInitializer& ObjectInitializer); virtual ~UBaseUserWiget();

virtual void NativeConstruct();

public: UFUNCTION(BlueprintCallable, BlueprintCosmetic) void ActiveFunc();

UFUNCTION(BlueprintNativeEvent)
    UWidget* GetWidget(const int32& Id);
virtual UWidget* GetWidget_Implementation(const int32& Id);

}; `

` void UBaseUserWiget::NativeConstruct() { Super::NativeConstruct();

LuaCtor("ui.baseuserwiget", this);  

} `

situation 1, I call "ActiveFunc" in the BP_ui. on windows, that works well, but on android, that does not work,

situation 2, I override the method "GetWidget" in BP, on windows, that works well, but on android, that does not work,

ue4 version: 4.18.3

do you know how it happens?

please help, thank you

asqbtcupid commented 6 years ago

It works well in my phone,I don't know why you can't.