proletariatgames / unreal.hx

Unreal.hx: Haxe Integration for Unreal
MIT License
423 stars 42 forks source link

Haxe error when overriding SetupPlayerInputComponent #122

Open yuhe00 opened 5 years ago

yuhe00 commented 5 years ago

When overriding SetupPlayerInputComponent in an APawn actor like this:

    override public function SetupPlayerInputComponent(InputComponent:UInputComponent) {
        InputComponent.BindActionHxVoid("Action1", EInputEvent.IE_Pressed, this, onAction1);
        InputComponent.BindActionHxVoid("Action2", EInputEvent.IE_Pressed, this, onAction2);
        InputComponent.BindActionHxVoid("Action3", EInputEvent.IE_Pressed, this, onAction3);
    }

I get this when I run the game.

HaxeLog: Error: HaxeCodeDispatcher.hx:75: AKFTargetedPawn.SetupPlayerInputComponent: The object at index 83615 (UInputComponent) had incompatible serial numbers: 38173 != 0
HaxeLog: Error: HaxeCodeDispatcher.hx:79: Stack trace:
Called from uhx.ClassWrap.wrap (uhx/ClassWrap.hx line 60)