proletariatgames / unreal.hx

Unreal.hx: Haxe Integration for Unreal
MIT License
424 stars 43 forks source link

BlueprintNativeEvent not working with cppia #121

Open yuhe00 opened 5 years ago

yuhe00 commented 5 years ago

When I create a BlueprintNativeEvent in Haxe like this:

    @:ufunction(BlueprintCallable, BlueprintNativeEvent)
    public function Shoot(medicineType:EMedicineType):Void;

    public function Shoot_Implementation(medicineType:EMedicineType) {
        if (!bShooting) {
            trace("Shoot");
        }
    }

And I try to subclass the actor in a Blueprint and override the event:

Capture

It doesn't work if I'm using cppia. It works just fine if I compile as static.

datee commented 5 years ago

Did some further testing on this - and found some odd cases here:

user created @:uenum(BlueprintType) in Haxe -from scripts/cppia : "Cannot override ... which was declared in a parent with different signature" -from static : Works as expected. -@:uenum(BlueprintType) in static, BlueprintNativeEvent in scripts: "Cannot override ... which was declared in a parent with different signature"

other uenums from UE4s api -from scripts/cppia : Works as expected. -from static : Works as expected.

Other types (FString, Bool etc) -from scripts/cppia : Works as expected. -from static : Works as expected.

Call to Parent function in BP : -from static : Works as expected. -from scripts/cppia : BP error when playing : "Infinite loop detected" test