Haxe-UnrealEngine5
Haxe-UnrealEngine5 copied to clipboard
Unreal Enums seems to create problems
It seems that in general trying to use Unreal Enums in Haxe causes problems.
Test:
var b:EBodyCollisionResponse = EBodyCollisionResponse.BodyCollision_Enabled;
var c:EBlendableLocation = EBlendableLocation.BL_AfterTonemapping;
var e:EndPlayReason:EEndPlayReason = EEndPlayReason.Destroyed;
I get :
C:\dev\Unreal\SampleProject\Source\HaxeCompatibility\HaxeOutput\src\MyActor.cpp 36 Error (active) E1696 cannot open source file "EBlendableLocation.h" HaxeProject
C:\dev\Unreal\SampleProject\Source\HaxeCompatibility\HaxeOutput\src\MyActor.cpp 36 Error (active) E1696 cannot open source file "EBodyCollisionResponse/Type.h" HaxeProject
C:\dev\Unreal\SampleProject\Source\HaxeCompatibility\HaxeOutput\src\MyActor.cpp 39 Error (active) E1696 cannot open source file "EEndPlayReason/Type.h" HaxeProject
C:\dev\Unreal\SampleProject\Source\HaxeCompatibility\HaxeOutput\src\MyActor.cpp 42 Error (active) E0276 name followed by '::' must be a class or namespace name HaxeProject
C:\dev\Unreal\SampleProject\Source\HaxeCompatibility\HaxeOutput\src\MyActor.cpp 88 Error (active) E0276 name followed by '::' must be a class or namespace name HaxeProject
C:\dev\Unreal\SampleProject\Source\HaxeCompatibility\HaxeOutput\src\MyActor.cpp 89 Error (active) E0413 no suitable conversion function from "EEndPlayReason::Type" to "EEndPlayReason::Type" exists HaxeProject
This is an issue with Haxe itself. I’ve been trying to find a solution, but also waiting to see if this pull request gets accepted:
https://github.com/HaxeFoundation/haxe/pull/10830
in mean time, next commit should also fix this somewhat by replacing the externs with abstracts.
Yes ok i see. Well thats good to know then! Im just looking into testing this and reporting things that i find! 👍