Unreal.js icon indicating copy to clipboard operation
Unreal.js copied to clipboard

ReceiveTick doesn't fire on UE 4.24.2 (possibly earlier versions also)

Open itaib opened this issue 4 years ago • 3 comments

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?

itaib avatar Feb 21 '20 03:02 itaib

Hey @itaib did you recompile the engine to set this flag? Otherwise where should this be set? Thanks!

etiennepinchon avatar Nov 07 '20 19:11 etiennepinchon

@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.

itaib avatar Nov 07 '20 19:11 itaib

It works! Thank you sooo much! 🙏 Have a great day!

etiennepinchon avatar Nov 07 '20 20:11 etiennepinchon