OnHit Event

Why do we need to use UFUNCTION() before initialising OnHit?

Because it needs reflection in order to work.

https://docs.unrealengine.com/en-US/Programming/UnrealArchitecture/Reference/Functions/index.html
https://www.unrealengine.com/en-US/blog/unreal-property-system-reflection

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms