Unreal.js
Unreal.js copied to clipboard
ReceiveTick doesn't fire on UE 4.24.2 (possibly earlier versions also)
This seems to be due to a change in AActor::Tick that adds this check before calling the blueprint ReceiveTick:
if (GetClass()->HasAnyClassFlags(CLASS_CompiledFromBlueprint) || !GetClass()->HasAnyClassFlags(CLASS_Native))
while UnrealJS sets some classes as native in ExportUnrealEngineClasses.
ReceiveTick works when adding the CLASS_CompiledFromBlueprint flag like so:
Class->ClassFlags |= (CLASS_Native | CLASS_CompiledFromBlueprint);
but setting the class to both CLASS_Native and CLASS_CompiledFromBlueprint seems contradictory, just by the names of the flags.
Perhaps someone with more knowledge on the flags could answer if adding that flag is ok and shouldn't create side-effects?
Hey @itaib did you recompile the engine to set this flag? Otherwise where should this be set? Thanks!
@etiennepinchon not the engine. I only recompiled the unreal.js-core plugin with a simple change.
I changed this line:
from
Class->ClassFlags |= CLASS_Native;
to
Class->ClassFlags |= (CLASS_Native | CLASS_CompiledFromBlueprint);
it was a while ago. hopefully this still works for you.
It works! Thank you sooo much! 🙏 Have a great day!