Hi,
I was wondering why I might need Interface and other blueprint classes implement the function in the Interface ? Can I create one global function and call it from blueprint classes that need this function ?
Hi,
I was wondering why I might need Interface and other blueprint classes implement the function in the Interface ? Can I create one global function and call it from blueprint classes that need this function ?
If it is something that you can do in a global function, go right ahead, absolutely donāt add indirection where you donāt need it
Where they shine is when used to abstract things, be they actual things or actions, e.g. is some actor the player just clicked on āinteractableā? or āhitableā? If so you can cast to the interface and send a message to whatever it is saying āIām interacting with you nowā without having to know anything about what it actually is (other than it implements the interactable interface), which is good for numerous reasons.